Small step forward, in /recalbox/scripts/rpi-pin56-power.py I replaced GPIO from pin 5 to 17 and now by pressing the power button the RPi4 shutdown.

Now would need to setup the power on and LEDs behavior.