OK, so is there a device that will detect a leak and shut off power to the pump?
I don't see myself flipping a switch/breaker/whatever daily when I leave the house.
Not that I can find. It can possibly be custom built with a flow sensor but should go at the pump to be effective.
Next best thing would be a run timer.
You're back in the smart home realm. I have all the stuff to do this, except a flow sensor. Bought it for my old house and never installed it.
For valves, there are a bunch of different brands. You can do an in-line replacement valve. This one also has a flow meter, which would be really nice.
There are also add-on controls that just operate your existing 1/4 turn ball valves. I have one of this sitting in a box somewhere. The reason I never installed it at the old place is the valve was too stiff and i needed to replaced it before I could install the operator....and I was lazy.
The other things in the pic above are leak detectors. You can places those around your house in places where there are likely to be leaks. Some simple rules in your home controller will tell it to close the valve when any of them detect water.
Of course you can also add a smart switch or contactor on the power feed with the same rules so it kills power to the pump as well.
Depending on how many people live in your house and how complicated you want to make things, you can also do geofencing or other types of presence detection so when you leave the house, it automatically kills power or closes the valve. Or, use the flow detector or just a sensor monitoring the pump and if you are not home and it sees the pump powered on for a certain time or it sees a certain amount of usage on the flow meter, it can also kill the pump and/or close the valve.
And even if you have several people and the automated stuff would be too complicated, if you have a security system, you can tie it to the smart home setup and when the security system is armed "away", it shuts the well off or puts it in to a monitoring mode.
Or you could just install a $5 2-pole switch and remember to shut it off when you leave.