Personally, I would do the two stages for the pump motor in one. It hardly seems worth customising the sketch (you still need to calculate some form of rectified average and check rapidly) to know when the pump is running, when it’s likely to be easier to add in the start and run times to an existing fully proven piece of software. But you’re doing the job, it’s your choice.
If you search the forum here for “Update to 3-Phase PLL sketch”, you should find it. I don’t use Github - it’s too arcane for me.
Likewise, if you search here for “emonLibCM”, you should find the single-phase library and example sketches.
What are the legal or safety considerations with the (potable) water supply? My immediate thought was, might a header tank on the roof be feasible, which you could refill when demand dropped off?