For example the Montreal metro currently only allows a train to leave a station when the platform of the next one is free, limiting the frequency of this very crowded system. With modern signaling, trains can creep up to the ones before them and reduce the time between them down to 40 seconds - but it's more difficult with all those slopes around.
It's also making extending platform lengths or moving/adding stations nearly impossible.
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).
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.
And according to this Wikipedia list: https://fr.wikipedia.org/wiki/Liste_des_accidents_de_métro
The last collision in Paris metro was in 1981