ESPimatic itself will fit on 512K ESP. Problem is this would leave only 64K for SPIFFS. Not all the HTML files would fit on that tiny bit of SPIFFS.
To solve this, there are a few workarounds:
Buy a ESP with more flash
Simplest and easy solution. Use a ESP with more room for HTML files and future updates
Compress and ditch HTML files
Don’t upload the HTML files you are not using, and the file you do use compress them with .gz compression
Alter Arduino boards file
You can add an alternative ESP board to the boards file, allowing you to give more flash to SPIFFS (if someone hase a guid for this … )