Setup remote power for iMac

My girlfriend works mostly remotely, but much of what she needs to do requires her remoting into an iMac in her office. It’s a small office without any dedicated IT. They use a remote software service that they have to manually start up when the Mac boots, and it sometimes crashes, so she can’t access it remotely, has to drive into the office and manually restart the machine and start up the service.

So I was thinking something like a PiKVM or similar + tailscale for remoting in to it. But if the machine crashes, she’d like to be able to power cycle the machine remotely.

If it were a PC desktop, there’s plenty of solutions there. But is there something like a remote power strip that I can plug the IPKVM and Mac into? Would I be able to set such a thing up in a way that doesn’t involve port forwarding on the router, which I don’t have access to?

What about a smart plug to toggle the power on the iMac. In the last few years Apple has added a setting to power on when the system receives power. This doesn’t have the flexibility of the options you mentioned, but is a very simple way to control the iMac remotely.

There is not any good solution for Apple products unfortunately.

What @Bikewanderer posted above is your best bet.