Before I put a rodent into my snake's cage I handle it for a few minutes first. I don't rile them up, but a rodent that's more aggressive instinctively will not be fed. I've had two aggressive rodents pose a problem before...
One was a large mouse. I reached in and grabbed it and took a strike from one of my gals. She didn't wrap, though, and let go immediately. The mouse chewed me up.
The second was a weaned rat who my spider girl had already struck who got his mouth free. I put a chopstick in it's mouth before he could get a bite on her.
The real answer to your question is prevention and careful monitoring, I suppose. I try to prevent the situation. And if I can't, well, I'll gladly take a strike and some angry bites before my snakes are injured.