Have you thought of a “watchdog timer”?
A piece of software that guards a trigger/value is available.
[Release] WatchDog Timer
Maybe that can protect your system.
Grtn Ben