Bob
If the train is already in the crossing,the trolley approach block will be dead. When the trolley arrives it will stop until the train leaves.
If the trolley is already in the approach block and the train arrives,the trolley will still stop unless it is too far in the middle. If one roller is in the hot middle section,it will continue running through the block and out the other side. Since the insulated rail for the train is far enough away,the trolley should have ample time to get through the crossing before the train arrives.
Only an outside insulated rail is needed on the train approach. For unidirectional operation perhaps 4 feet on the approach and 6 inches on the other side of the crossing. Only an isolated center rail section is needed on the trolley approach. Perhaps 12 inches in the approach up to a hot center in the middle. A 3pdt relay is needed. One contact set NC removes power from the center rail of the trolley approach block. A second contact set works the gates (assuming the gate does not impede as described). An optional 3rd set can work a block signal for the train..
Again this takes some thoughtful placement of the 2 isolated blocks.
If really worried about a collision I guess an additional safeguard with an additional relay could be used making a safety shutoff.. Make an outside insulated rail in the trolley line right in the intersection activating a relay and shut off a small section of the approaching center rail of the train much closer to the center. If everything was normal the train would not be affected. If the trolley stalled or did not clear in time the train would run on the approach but shut off before it hit .. However I think it would be reliable without it..All this is harder to describe and draw than actually do.
Dale H