On the topic of general purpose OSes for the ESP32 a project I've been a big fan of is SolarOS, which provides Python and Lua runtimes for user application development and a rapidly expanding API and list of built-in applications. I use it on a LilyGO T-Deck to turn it into something similar to a classic PDA with a python program that reads battery status from various devices I have running on ANT BMS units, far quicker than the utter garbage first-party ANT mobile app.