Trains can also cause accidents and, for example, run into each other on a single-track section. To prevent this, the European Train Control System ETCS is being expanded. This is what the yellow boxes in the track are for.
These are transponders that send a message to a train travelling across them. This can be "Stop!", for example, when two trains are approaching each other. The train evaluates the signal and can then initiate an emergency brake without human intervention. In this way, the trains can prevent an accident themselves at the last moment.