Lots of possibilities out there, important question. e.g. https://www.instructables.com/id/DIY-Mini-UPS-for-Router-Modem/
I’d like to see a reliable answer.