How to configure platformio.ini to disallow reading firmware?

Not included in PlatformIO. See

Note that ESP32 of older silicon revision flash encryption / secure has been broken before.

The relevant documentation from Espressif is here.