Flashing throw serial as soon as device connected to USB

You could create a cloud function that sets it to Safe mode when it wakes up, or even flashes it over the cloud as soon as it gets online.
Alternatively, there's this neat trick: