Limit shower time by timer or volume on existing installation

We have 6 teenagers in the house, and we cannot be policemen all the time to limit their showering behaviour, so therefor I would like to :

  • on existing installation on the water tube
  • by strong preference IoT (wifi) controlled
    install a solution which limit shower by time, so warm water custs off after eg. 5min. or by volume eg. if >40 liters are used

Important is that we can “program” a “freeze” time, for eg. 15min not possible to show with warm water but after eg.15min, the system get’s “reset” so users can start showering again.

FYI … I am a simple dummy users, so not capably to do presonal complex programming myzelf via whatsever solutions. I am looking to existing solutions