In Australia when it's flat, there were still collisions. Trains are very very heavy. The collision report recommendations had been to keep a long distance between trains. For trains ahead, the coming train would slow down and would come to a stop, if it's probably one train length ahead.
I'm not sure how long the distance is though. 40 seconds is really really hard to estimate with very very heavy trains and no weight sensors. Even AI/ML cannot predict this (re: no weight sensors).
If there were collisions the signalling was crap. Train intervals below one minute are definitely possible. For example the new Thameslink line in London will have (or already has?) intervals well below one minute.
Trains know their position very precisely, with errors less than 20cm, and their braking characteristics and error margins are well known, especially in tunnels where there are now wet leaves or snow on the tracks. Automatic train operation makes trains stop at precisely the same spot each time (for example to match train doors to gates), to the point where increased track wear becomes a concern.
Why would a computer need weight sensors? It knows exactly how hard the electric motor worked when it was accelerating the train and exactly how quickly the train accelerated. It should be able to come up with an entirely usable estimate of the train's weight.
Just as an aside, modern transit trains have weight sensors anyway which adjusts the pressure in the air suspension to make sure the train is exactly level with the platforms.
I'm not sure how long the distance is though. 40 seconds is really really hard to estimate with very very heavy trains and no weight sensors. Even AI/ML cannot predict this (re: no weight sensors).