It might be possible to use Device Watchdog to determine if the solar relay is āliveā or not. However, un-powering a Z-Wave device is generally a bad idea.
Alternatively, you could use a device like the Ring Gen 2 Ring Extender to detect if there is power to a 120v outlet. It might also be possible to use the Shelly Uni to determine the battery voltage and only turn it on when it is high enough.