I know there is a C# service that someone wrote that ran on a local windows box, that would power cycle a Belkin WeMo switch if it couldn’t connect to the internet after a period of time. Belkin Wemo has an api, so you could write it on any that script fairly easily. It might be the cheapest route.
Here was the youtube video on watched on it awhile ago, and it has the code there
I did have this running awhile ago, but i don’t use it because my network connectivity is solid.