Remote power-down for KE?

Does anyone know of a way to remotely shutdown/power off a KE?

I could just use a smart plug if I knew that the OS would cleanly shutdown on a power loss. But it seems like the KE takes a fraction of a second longer to stop when I hit the rocker switch on side of the printer compared to when I use a smart plug to cut power, Could the switch be triggering a clean shutdown?

I thought about a software solution; I enabled SSH and can login as root. But the pared-down linux distro that comes with the KE doesn’t include the shutdown command.

Has anyone solved this problem?