m=Low(0) and M=High(1) will never happen simultaniously
I didn't understand what you mean by above statement.
But what I understand is m and M will never be high at the same time. Since then, I think what you need is an SR Latch. It is easy to build an SR Latch using NAND gates. Here are the circuits I tried:
The Basic RS NAND Latch says:
Edit
It is understood that when the water is at the minimum when min=0, so it is reversed. Just add a NOT gate after the min, and you can use belowthe circuits above. A NOT gate could be build by a NAND gate by shorting its inputs.Here is the final circuit: