Is there a FOSS implementation of esim any where? AFAIK all privacy/security rom need to download a proprietary component to use esim, and such component need to run as root (as of now).
I wonder if this is another HDMI situation where implementing a FOSS version would violate some NDA of some sort.
The e-sim in a phone is a separate chip with proprietary firmware. The chances of a FOSS version of this HW are nearly nonexistent. It would require developing your own silicon and putting it into your own phones. Chances of FOSS FW for this proprietary HW are also very small, because it is difficult and there is not much reason to do so.
Currently, registering an e-sim requires a proprietary app (usually google). There is no FOSS alternative. Work on one is slow and there are some IP issues.
Using an e-sim does not require a proprietary app. So you can remove google services or remove their access to the e-sim HW once you have it registered. GrapheneOS uses this.