I do in fact do what you are wanting to do, but for a slightly different purpose.
I have AT&T U-Verse Fiber, and as a result I am forced to use their stupid modem/router combo and if I want to use my own router it either has to be in AP mode or have a double NAT with a router behind router config. After some research I found out a bypass method using an unmanaged switch that holds the ONT in an authenticated state while bridging the WAN ports between my router, their gateway, and their ONT. This is where the smart plug and web pinger come in, the ATT gateway is on the plug so when the power comes up, the gateway turns on, authenticates with the ONT, and then turns off. The router then has it's MAC spoofed to the Gateway's MAC so that the authentication stays but the gateway is no longer on the network so there is no collision. But this is triggered when the internet is determined to be offline, and will continue this cycle until the internet is returned. Sometimes even though the ONT is authenticated, there is collision between the two routers, so the Auto-Off serves to shut it down to see if that is the case, but if the internet still does not come back, it will go through the cycle again.
I do this with three things: RM, Web Pinger, and Auto Off.
Web-Pinger
Note: The system start immediately turns the internet status virtual switch off, and then checks with the web pinger at an interval tailored towards the authentication time for the gateway.


