There are devices with "watchdog" features that can cycle power automatically if an ICMP ping fails. https://shop.netio.eu/netio-power-sockets/powercable-2pz/
Also, people have rolled their own watchdog solutions using Sonoff devices flashed with Tasmota. https://community.home-assistant.io/t/watchdog-device-using-...