I use local particle-cli to flash device with USB. It is ask press Enter when device connected.
(my device wake up one time in day and then sleep again for 24 hour)
I have to catch this 20 second working time during day to change my firmware. It is any way
to make some batch file under Windows (to check if we have com COM port connected try to flash without ENTER key and if not success wait 2 second and try again till not flash with good result)
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:
Considering you need to have your computer running anyhow, you can have that trigger a function that will put it into safe mode as soon as it comes online. Then you can flash it OTA if you so desire.