If you're staying in python or another dynamic language it could probably work. Unfortunately I don't think there are a lot of native compilers that run on esp32s, though there are some[0]
[0]: https://github.com/valdanylchuk/xcc700