Actually under such circumstances I would recommend a UPS with Built in filter in any case.
If the power is unstable like this, usually the power is also "unclean" with spikes and power drops.
This can be unhealthy for electronics, so having a UPS gives you a more regular power.
I bought a not too expensive UPS from CyberPower, and all my electronics is connected through it, some are only on the Filter, other also have battery backup, like the HTPC, Computer, Router, SIP adapter, Network Switch, External Harddrives, Night lights and TimeCapsule. On the Filter I connected the rest, TV, Consoles, HIFI.
This way should the power fail, I can still use the phone, (Assuming the internet still works to my house), keep the computer running long enough (~45 minutes) to shut down safely, and be able to see since I also have some lights connected. And all equipment is filtered against spikes and other noise on the electric line.