There is (I kid you not) currently an exhibition in the Nuremberg railway museum featuring the devlopment of railway lavatories (
https://dbmuseum.de/en/underpressure) which makes an interesting point that it was air pressure caused by high-speed trains in tunnels that drove the switch to retention tanks, as open WC pipes caused (at best) pressure changes in the carriages or (at worst) back-flow up the WC drains. That's probably one reason why the APT was one of the first trains to have contained lavatories in the UK.
The move to pressure-sealed trains forced the use of retention tanks, which in turn encouraged low-water systems such as the recirculating chemical closets on the APT and first-gen Eurostar, pneumatic WCs on the 159s or the modern vacuum systems: otherwise not only do you have to empty them very frequently but there's a gradual but significant shift in centre of gravity as water passes from overhead freshwater tanks to underframe septic tanks which affects the dynamics of the train.