Some variants of the ESP32 support executing code from external memory (PSRAM) too. That gives you 8MB more to play with.