A bidirectional single track tramway on a long distance road? Sounds very scary. How long is the "rockfall section" where road and rail would share and how fast would the tram-trains be running? There's also the problem of a single track railway not being wide enough for a decent highway.
Do it like this - if a bit longer!
https://www.tripadvisor.com/Locatio..._Jamtland_County_Jamtland_and_Harjedalen.html
After stopping all the traffic initially you could release the stuff to follow the train, then open both directions when the train was clear of the shared sections.