I'm not even sure derailments is the worst flaw.
As soon as one train has to slow down, you're going to get the mother of all cascading effects - trains are slow to brake, but their acceleration is quite a bit slower than that, and you'll be limited to, at the very best, the acceleration of the slowest train in front of you.
Part of the answer to that is better track maintenance. However that isn't a perfect answer and so we need larger gaps.
Note that cars on the freeway are normally much closer together than is safe as well. If cars maintained a safe following distance we would need 5 times as many lanes. (you know the massive freeways in Huston that urbanists like to show as bad: that is about the correct size of freeway for Des Moines, Huston needs many more if they want to be a car oriented city)