There was a sad case in the USA some years ago where a railway ran parallel and close to a road which had traffic lights to control access from a side road over a level crossing on the railway. Vehicles were queued on the side road at the traffic lights and backed up as far as the level crossing. A bus (I think it may have been a school bus) stopped *on* the crossing. And the lights started to flash because a train was coming...
The TV programme I saw which analysed this crash mentioned that city authorities looked as ways of integrating the level crossing with the traffic lights, so that when a train was due, traffic on the side road got a green light which cleared the queue and prevented it backing up on the level crossing. They completely missed the point that all level crossings should be treated as what we in the UK call box junctions: do not enter unless there is sufficient space on the far side to accommodate your vehicle. It sounded as if in the USA, the concept of not stopping *on* a level crossing was somewhat alien to them ;-)
Box junctions at side junctions work well, apart from one little flaw: you can be on the major road, with traffic from a side road on the left obliged to give way to you. And you stop at the box junction. As soon as the traffic ahead moves, a car on the side road turns left and occupies the space. And then another one does when the traffic moves again. And you on the major road are stuck there like a lemon, never able to go because no-one on the side road gives you the priority that the HC rules decree. Without the box junction, you'd be right behind the car ahead, and the side-road car would not be able to get out - unless you *allowed* it, as courtesy suggests should happen *occasionally* (as opposed to every time, as a defined right). But this would block oncoming traffic which wants to turn right into the side road and is why the box junction is there. It could be solved by the box junction only covering the patch of main road that right-turners need to turn into the side road, whereas often it covers the whole width of road in front of the side road, including the bit used by side road traffic turning left.