Although you could and it should be pretty easy to implement, I'd argue that you shouldn't do this. If someone gets access to your router, then they also have direct access to the AP. I usually try to isolate device access and only allow login from one main (hopefully secure) workstation, without a web of ssh credentials linking between various devices.
I use WireGuard on my phone to connect to my home WireGuard server, in two clicks I am connected.
I use connectbot on my phone to SSH into my console using keys so that it does not need a password on login a script is automatically executed which wakes up my server all with just one click.
This is my script, using etherwake to wake up:
#!/bin/sh
wu="$1"
[[ -z "$wu" ]] && wu="72:CF:22:218:8B:A4"
logger -p user.info -t "etherwake" "Sending Wake up to $wu"
etherwake -D -b -i br-lan "$wu"