Hi Gang:
The mainline is protected by derails to keep stray cars from fouling the track. They are not really for stopping run-a-way locomotives. Remember the movie about such a train? The heavy locomotive just busted the derails off the track. Also to protect the mainline usually they try to lay the sidings lower than the main.
Carl.