Of course, this was a requirement in Jewish law centuries before.
True.
While not part of religious law, classical civilization had a much better way of dealing with this than medieval and early modern society. Greeks and Romans had excellent sewer and aqueduct systems. Up till early 19th century, European cities did not.
This meant that up till then, European cities had been “demographic sinks,” with death rate consistently and often significantly exceeding the birth rate. Cities maintained population and even grew only because of constant immigration from rapidly growing populations in the country areas, where less concentrated populations spread disease less efficiently.