For 'intentional' turn off / turn on of either USB or IP cameras, I just do a "sudo systemctl restart motioneye".
I used to have intermittent issues with a USB dashcam, but never found a good way to 'watchdog' it, so ended adding a cron job to restart it every hour. If I were to write a watchdog, I'd look for the camera to 'disappear', and set a flag, then watch for it to re-appear, unset the flag, and restart motioneye.