My personal preferred infra there would be for all devices to be meshed together, and a smart water shutoff valve able to cut off automatically if a water leak sensor trips.