This discussion is going in the wrong direction. It should be more about how and less about why but if everybody searches for a reason lets do that first
reason 1: Having a bit of information is better than having no information.
reason 2: Devices are located in remote locations and driving 10 miles just to find an equipment that works is a waste of resources
reason 3: installing UPS in 500 locations takes months and costs a lot, a solution like this can be implemented in days
a "dying gasp" packet from the router
the total time from the power disconnect until the CPU or MPU shuts down is usually more than a second
the router CPU runs at 400MHz
there is enough time to send more than a "dying gasp" packet
where are you going to send it when the power on the site is failing?
Usually routers don`t just ping servers for no reason so if a server connected to this network receives a PING from a router that could mean a power outage on that specific router
this being said, can we focus on the how part ?