It isn't easy but flipper did a remarkable work demonstrating it was possible. Tactility is following a similar concept and in my opinion is the project that implemented it best after flipper.
More recently also became possible to run Java apps with a JVM on ESP32: https://github.com/FlintVN/FlintESPJVM which is not yet arbitrary (e.g. download and run) but that is the route of development.
I've been toying with the ESP32 architecture for a few years. (I began with ESP32-DevKitC in 2022.) I recently got four ESP32-S3 modules with the intent of trying out the ESP32 Bus Pirate (https://github.com/geo-tp/ESP32-Bus-Pirate).
I hadn't heard about any Linux ports until I saw your comment here. Thanks!
The "playground" Linux port looks interesting, but it hasn't seen any updates for nearly a year. Still, I'm going to try it on a ESP32-S3 N16R8 and see how it goes.
It's funny, because I first ran Linux (SLS & Yggdrasil) on a PC with a 33MHz clock, 32MB RAM, and a 70MB hard drive. The N16R8 clock speed, RAM, and flash are all within an order of magnitude of what was on that old PC.
In the past, the solution for arbitrary code was running scripts such as Wrench: https://github.com/jingoro2112/wrench
More recently also became possible to run Java apps with a JVM on ESP32: https://github.com/FlintVN/FlintESPJVM which is not yet arbitrary (e.g. download and run) but that is the route of development.
Even Linux was demonstrated running on ESP32 albeit I've never tried it: https://www.youtube.com/watch?v=pj0a91vlcGo