It can’t be done with smartthings by itself because as a largely cloud-based platform all custom automations run in the cloud and the local automations aren’t able to perceive that the modem has dropped.
So you have two choices.
First, some people just have the modem plugged into a smart plug and have it reboot once a day. That may be enough for some situations.
Otherwise, you have to buy a different piece of equipment. There are quite a few different choices, but in pretty much all cases this will either be a smart plug (not controlled by smartthings) or a router which regularly pings a website and then if the ping doesn’t go through initiate the reboot. But there are other people who have gone to full UPS solutions. It just depends what exactly you’re trying to accomplish and how much you want to spend.
There have been a number of project reports posted about these different solutions, so you can go to the quick browse lists in the community – created wiki, look down towards the bottom of the page for the “project reports“ section and then choose the “power“ list.
Or you can just go straight to the following thread which discusses a couple of specific smart plugs which can do this.