You can try this by flipping the breaker they’re on, but assuming they report OFFLINE to SmartThings within a small period of time, you could do something like this:
Define Boolean variable: PowerFail
Execute
Every 5 minutes (or whatever interval you’d like)
IF Plug $status is OFFLINE
THEN
Set PowerFail equal True
In the condition that turns your pump on, add an “AND PowerFail is False” condition.
IF
Your normal conditions to turn on pump
AND PowerFail is False
THEN turn pump on
ELSE turn pump off
To clear it, you can create an Automation in your ST App called “FilterPrimed” or something. Then in the same piston
IF Routine (found under virtual devices) executes FilterPrimed
Then set PowerFail equal false