Keep brew far away from your prod system. Everything you can‘t do in macos just use a vm.
Don‘t touch the system and Timemachine will never corrupt, its that easy in my experience.
I kind of made a general purpose sleep proxy myself a few years ago with a apache and some cgi scripts getting triggered when I visit my /jellyfin or /guacamole
It just listened to the fixed routes, woke the server and proxied the page when finished (sometimes took 2 loads)
But basically is the same as in the arzicle except I didn‘t need to manually WOL anything and my server just went to sleep by itself