Thanks for your great work!
I have been out for a couple of week and for some reason I don’t get email notices of your posts!
I have found the same 2 bugs you have found and I have fixed those in my local code but not in the GitHub .
I will have a look to your GitHub code and your HW setup,I think it should be almost identical to mine.
When you say that the code is unstable and hang randomly, I would like to understand what you really mean :
It is during a web request , the code doesn’t reply ?
Or the Esp32 hang and you have to reset it?
The Esp32 library code is far from beeing fully tested and it is not reliable as the Esp8266 core library.
In theory the code running on Esp8266 using libraries ported to Esp32 should run on Esp32 with no changes, but this in not always true!
In particular all this PROGMEM related statements that are meaningless for Esp32 where accepted onEsp8266 but may cause problems on Esp32.
If you give me more details on your failures or hangs at run time I will try to do some test and to understand possible reasons.