There was a similar question posted a while ago in which the proposed workaround was to shut off the circuit breaker supplying the receptacle rather than the usual way. Not ideal but it works.
An unexpected power loss results in a specific shutdown code, different from a normal shutdown, which results in it starting up when power returns (assuming that option was selected).
Wake on LAN won't start a Mac that has been shut down. It can only wake it from sleep.
It’s very unlikely, but it’s not the first time a Mac has shut down on me for no apparent reason.
If the Mac is shutting down on its own for no apparent reason, that's a different story. When it does that, does it report a problem upon starting it up again?
Another possibility is to program that Mac to start up on its own at a particular time of day: Schedule your Mac to turn on or off in Terminal - Apple Support. That might be a workaround to cope with a Mac spontaneously shutting down for reasons that cannot be determined.