Making my own HEIF/HEIC files
This use of GPAC may move closer to the goals you desire:

What is GPAC?
GPAC is an Open Source multimedia framework. GPAC is used for research and academic purposes and beyond through industrial collaborations! The project covers different aspects of multimedia, with a focus on presentation technologies (graphics, animation and interactivity) and on multimedia packaging formats such as MP4.

More details:

Compare and convert HEIF, JPEG and WebP images with rokka
GPAC support for HEIF.

A little more research and an answer here provides the way!
We need several things installed, ideally with homebrew:

x265 and GPAC
brew install x265 gpac

FFmpeg with x265 support
brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265



Reference
Now that you have the tools, try a script like this to convert images in a folder to HEIF/HEIC:
for F in *.jpg *.png *.tif *.tiff; \
  do ffmpeg -i &quot;$F&quot; -crf 23 -vf &quot;scale=trunc(iw/2)*2:trunc(ih/2)*2&quot; -preset slower -pix_fmt yuv420p -f hevc &quot;${F%.*}.hvc&quot; &amp;&amp; \
     MP4Box -add-image &quot;${F%.*}.hvc&quot; -ab heic -new &quot;${F%.*}.heic&quot; &amp;&amp; \
     rm &quot;${F%.*}.hvc&quot;;
  done;

I tried it with a folder of images and it works. It turns images with odd dimensions to even dimensions, for instance, but besides a few caveats it works.