I like the ingenuity, but I didn’t want have to build custom hardware. My solution:
Lutron smart plug
“On Air” sign off of Etsy
Script to watch log file indicating the state of my webcam. On changes, triggers an Apple Home command to turn the Lutron switch off and on.
You should write about it and add pictures! :)