This doesn’t fit the question exactly but I feel it’s in the same spirit, and a kind of interesting solution, I think.
Back in the early days of scryptcoin mining, I had a few gpu mining rigs running Linux. Occasionally they would hard lock and I’d have to power cycle them.
What I ended up doing is getting some usb to serial adapters, wrote a python script that ran on startup and would send a character over serial at a set interval in a loop. That was hooked up, if I recall correctly, to an attiny85 using softwareserial and some ttl to rs232 conversion. It would listen over serial and if it didn’t receive anything with a reasonable time frame it’d flip a relay that cut mains power to the pc, then flipped it back. A deadman’s switch, of a sort. It worked great!