https://en.wikipedia.org/wiki/Railway_signalling#History_of_...
The worst will have been avoided, but at least one of the train will have to back down to the nearest junction, and depending on how packed it is they might have to back down a few more train as well. I’d assume in reality it would deadlock from there.
Some local routes with few trains a day, where there is no longer any track-side staff, operate in a simplified rules (there is a whole code for that). There, the train will arrive to a station and depending on a symbol in the timetable, it will either continue to the next station without any signals or permissions needed or will wait for crossing train in oposite direction (the train driver must also unlock the station office and call the dispatcher on phone in some cases). Switches are either operated by train crew or they are self-returning (one direction always go to track 1 in station, the other direction goes to track 2, and the switches can be travelled through in the oposite direction without setting them first (this is an accident on standard switches) and they return back.
So, the problem was that the crossing was there on some days and wasn't on some other days, driver forgot or misread the day and the train left into oncoming train...
Was a big discussion after that to do anything, even an uncertified mobile app to shout "train coming" at the driver... Otherwise Czech rep. has a very modern European rail infra, just some local branch routes run like this saving them from being cancelled completely, but the rules were simified maybe too much.
What is more interesting is how they get away with this when PTC is now mandatory (a lot of special operating rules/restrictions).
Lets say there is a north-south train line that is shared.
The schedule can create a number of north slots and south slots into which a train of a given speed and length can fit. A variety of different trains could fit into the same slot.
If a train is late, that train is moved into a later slot. That leaves a free slot where the train was going to go. Perhaps every later train is then delayed into a later slot also. Lets call this a rippling delay.
You would probably schedule some spare slots to prevent delays rippling through the entire day's schedule. Some slots might be long enough to permit several trains going in the same direction to travel (it's more efficient if 10 north trains go then 10 south trains rather than 10 north/south interleaved).