The troops are confined to barracks simply because they're shit scared of being killed. The army's presence in Northern Ireland is akin to putting a plaster on a broken leg.
As one of the troops in question, I have to say that the first sentence I quoted is not in accord with my memory.
Frustrated at the ROE, certainly. "Do not return fire unless you have a clear, identified target. Do not return fire if that target is back-stopped by IBs. Do not return fire unless you have come under fire from people firing for effect." That last bit was clarified by the nice people above us as: "You can only return fire once you have taken casualties."
But without any shadow of doubt, the greatest emotion we felt was sheer anger at how the various maniacs in Orange and Green balaclavas targeted civilians just trying to live normal lives.
One Loyalist tactic was to plant bombs in Mothercare shops. The logic being that Catholics tended to the Nationalist side, and Catholics also tended to have more children. So, blowing up people in such shops. When you have swept up the aftermath of such an event, the concept of taking the perpetrator in for a fair trial is a tough one to follow.
Not that the Green Balaclava Maniacs were one whit better. Prod-a-Prod was a favoured game. This involved kidnapping a random teenager from a Loyalist street, taking them to a Green pub, and beating them to death as entertainment for the evening.
I can assure you that fear of being killed was not a high consideration by any stretch of the imagination.
We understood that responding to the situation as we would have liked, and clearing the scum of both sides up so that the decent people trying to survive could do so in peace would have made things worse. Our understanding was that we were acting to buy time for a political solution to be found. For nigh on 30 years, that's what we did.
UDI as described would have been a different kettle of fish to OTL. The gloves would be off, and our ROE would have been very different.