If you have the machine turn on when AC is restored the UPS battery will still not have recharged, and if you have a second power cut or another glitch (not unlikely if it's an intermittent fault upstream of you) the UPS will not be able to supply power, so your server will suddenly lose power.
UPSs for computers usually delay restoring power to their load until their battery is recharged at least a certain amount. It doesn't look like yours has a control for that, but if it does you might be OK, otherwise you'll want to make the delay happen some other way. You could connect a Pi directly into your server's ethernet port with a cross over cable and do WoL through that.