First. The problem is not Nextcloud but Apple. HEIF is not a standard format. Maybe in the Apple world. I never used HEIF. I think HEIF is not standard in Imagemagick and that is the real problem.
Nextcloud can handle HEIF only with Imagemagick and HEIC for Imagemagick.