https://tech.michaelaltfield.net/2020/01/02/buskill-laptop-kill-cord-dead-man-switch/ Neat, simple system. A udev rule fires if a USB device is removed. I would not implement the hardware the way he did, but this is definitely an idea to play with.