If the situation does not always warrant a full shut-down, to set energy settings
to take best advantage of Sleep may be to an advantage. Usually I don't shut
down my Macs for weeks (if not several months) and only restart if I had software
update. Or if there had been an issue that I thought a restart could alleviate.
And my computers have automatically switching backup power supplies with
their own batteries; so there is a slight buffer should the grid power vaporize.
Or unseen high & low rapid shifts in the quality of electricity, affect costly Macs.
{Energy settings where a UPS is available, allow other options; such as those
suggested otherwise. An automatic restart after power failure, I don't use; in
part because multiple on-off shuttering disruptions have occurred in my area
and those can be bad on the Mac -- if it's in a restart mode & gets hit again.}
Neither high nor low fluctuation have affected my Macs, given better backup
power w/ automatic filtering. At times, I've also used standby onsite generation.
A dedicated unit that can power the Mac and also automatically step in when
the power is more or less than ideal, plus also run the Mac once grid is down,
can be helpful. Better models with more runtime on backup can help some.
If the room where the computer hardware lives can be kept cooler, that may also
be helpful should you need to keep them on-line & left to their own devices; the
sleep/energy efficient setting can be an alternative, to a shut-down unnecessarily.
Good luck & happy trails! 🙂