You need a way to gracefully shut down your hub during a power outage.
Short answer is modem. router, and hub on UPS. Additionally, a wi-fi plug for the hub,, a device that can tell the hub when it has lost power (changed from mains to battery) and an app or rule to initiate a shutdown. Restart the hub via the wi-fi plug when the power and internet is back up.
It works great!
I use the excellent Power Outage Manager App by @thebearmay.