HEIC isn’t a proprietary codec, it’s an ISO standard
Technically HEIF is a good format — it's half the size of WebP. WebP is based on a much weaker codec that is two generations older. AVIF is a freely-licensed HEIF alternative.
> The HEIC holds the HEIF data that is compressed using HEVC by MPEG
Wrapping a HEVC file in a container does not automatically void any patents of the contained file. Otherwise, anyone can shove any patent encumbered file format in a ".zip" container (or any container/wrapper) and avoid any patent or licensing issues.