You can place a thermal one time switch in the pump electric box if it does not already have one, and use a 135C thermal fuse to disconnect the pump power, using only one lead. Use some fibreglass sleeving to insulate it electrically and crimp the one side to the existing wiring common of the motor and the other side to the terminal that it used for common. That way the motor failing hot will stop it running, but will not protect if the wiring inside goes to ground.
Mains input you can use a 2 pole mains rated breaker on the input side to protect against overcurrent, to disconnect power to the unit. Place a mains switch after the breaker, as they are not designed to be a power switch, only being rated for a few cycles. Make sure the motor frame, and all metalwork, are attached by a green/yellow earthing cable to mains ground, and these cables must have crimp terminals both ends, and must be at least the same size as the mains conductors. Use shakeproof washers on each screw connection, and have a dedicated screw per item for this cable.