The advice in #5 broke my libreelec installation.
DON'T DO THIS
Just connect via SSH and launch this Lakka script : GitHub - marcelonovaes/lakka_nespi_power: Lakka 2.1 + NESPi CASE + Shutdown buttons
Not only did it not work (power/reset buttons didn't respond), after the reboot the device (a Pi 4) would no longer boot.