Hello @foudrou

M5StickCPlus2 has dedicated hardware (U8 etc.) to power off when the power button is pressed and hold. See schematic here.

Instead of setting POWER_HOLD_PIN low, the power off hardware pulls 3V3EN low which disables the 3.3 V DC/DC converter and thus killing the power to the ESP32.

Note: when the power button is hold long enough you'll see the green LED being turned on, indicating that 3V3EN is low.

Note: power off only works when run from battery.

Thanks
Felix