Using caddy which is server software, you can use caddy server as a reverse proxy to serve the esp32 webpage securely. I am playing around with it now but have not got it to work yet.
I have googled a little. The best way I think, is a port forwarding to your local ESP32. At the end, the router decides what to do with a incoming request.
Anyway, I will google "caddy" now. I have heard it the first time. I once had run a local server which was reachable through the internet (ApacheServer). But as I said: router is key for those projects. I guess, most SmartHomeSystems has to be "port forwarded".
I did get it to work about 4 months ago and then got side tracked. When I came back I forgot how I set it up. Networking is definitely not my forte'. But for a lot of what i want to do, being able to reach the esp32 over public network is important.
Yeah.. I agree. ESPs should be controllable easy through the internet. But unfortunately, it is not. To control the pins through the internet, it is absolutely easy, yes. I am using my godaddy homeage to control my ESPs. There are some certain methods to control your esp through a godaddy (or other providers) homepage. But streaming a camera, is different story