It’s completely unacceptable for trains on rails to have collisions with other trains. In general the best solution would be to have each train in each direction on a separate track. I know this might not be possible for areas near stations.
While a track for each direction is the optimum more often than not you have to work with what you have and especially in rural areas there might only be a single track available and adding more - especially if the landscape is more complex - it might be rather costly to add a second track or the people living there might protest against it.
Traffic signals for trains are not a guarantee of safety. Probably something mechanical that makes it impossible for trains to collide or that could shut off power to electric trains until it’s safe to proceed.
At least on continental Europe the signalling of trains not only consists of “traffic signals”. There are axle counters that count whether all of what had entered a protected block also left it again (usually employed inside stations) and the signals are protected by something that will trigger a full stop of the train if run over while showing a “stop” signal.
For example in Germany that is the PZB aka “punktförmige Zugbeeinflussung” which can be translated as “intermittent automatic train running control”: next to each signal and pre-signal there is an electro magnet that is read by the train's control system. If the pre-signal (which is usually located a kilometer in front of the main signal) signals that a signal with a “stop” symbol is upcoming it will control whether the speed of the train is low enough that it can stop at that signal. If not it will trigger a slow down of the train. If the train should pass the main signal while it shows a “stop” symbol it will trigger a full emergency stop.
In addition to this the signal operator is not allowed to change switches so that a route of a train will lead into a route occupied by another train.
The main cause of accidents with these systems is if the operator or train driver override the safety mechanism due to some mistake of the system and don't follow the proper procedures to do this. Or its due to shuting which might often circumvent these mechanisms as well.
In addition to the PZB there is also the LZB in Germany which essentially allows to get rid of the signals completely. It's usually used on high speed tracks and for example at the core track of the suburban train in Munich (S-Bahn) as well as all of the Munich subway (U-Bahn). The LZB allows to reduce the required distances between trains (due to the length of the way a train needs to stop from a given speed), for example in both cases of the S- and U-Bahn this can be as small as 80m. In addition to that in the Munich U-Bahn it also allows for automatic operation: the train driver merely triggers the train to start off and then it will proceed to the next station by itself. In Nuremberg there even already are subway lines that operate purely automatic.
Also please note that there aren't only electric trains as there are also diesel or hydrogen trains (or steam ones) where you can't simply switch off the power.
Local and express trains running on same track which will require extra tracks at stations for the local train to wait on whilst the express train’s wiz by. This definitely requires a lot of coordination of switching trains to different tracks and scheduling track usage.
This “coordination” is the bread and butter of the schedule creators (for the fixed plan) as well as the signal control operators (for quick fixes during operations).
Here you can see one of the instruments that is used to plan such schedules (it's German only, but you can use Google Translate or whatever to translate it).
Why the interfacing with authentic peripherals? And what kind of peripherals are we talking about?
This sort of thing https://signalbox.org/wp-content/uploads/2021/04/tunwellswestbNC15048.jpg
That link gives a 404

I find myself playing with an authentic Saxby and Farmer frame from which the original interlock bed has been removed and replaced with a much simpler later mechanism. Since it's not in a location where it's ever likely to control traffic again I'm wondering whether it would be feasible to mock up something similar to the original mechanism and then set it up with ghost signallers in (what would have been) boxes a mile or two away for demonstration purposes.
Something like that should definitely be possible. I know of a group of people that used an old signal control from DB and hooked it up to a model railway.