I’m going through the same thing with a pfsense bare metal nuc that doesn’t have power settings in bios. I’m planning to set up a switchbot linked with a switchbot smart plug to automatically press the power button.
Set up the smart plug in a different outlet with something that automatically turns on when power is restored (isp router, or maybe your ups).
In switchbot app, when plug power use goes up from 0, tell switchbot to press pfsense nuc power button.
Something to that effect. I’m still waiting on stuff to arrive. You could also just set up a switchbot and manually press the button whenever you want remotely through the app.
The spider with 7 legs: