A huge underground water tank has been made to protect residents from flooding and sewage spills going into rivers in Stroud.