Ditto to everything. I've gone through this for some time. When I get text after text one after another in rapid succession, especially with some pet names thrown in, I can tell what's about to happen. And the random unrelated insults are a big one for my SO sometimes too. Personally, it's a lot easier for me to disengage from the conversation when it's through texts, because I can't physically see him and I know he can't physically see me. I've used the "I love you but I don't want to continue..." line a few times in text, but have not been able to do the same as effectively in person. One thing I've found super helpful in dealing with him escalating via text insults is to remain calm (duh) and remove any emotion from the situation (duh). I know it's easy to say but hard to do, especially when people tell you to "not take it personally" (which, if you can figure out how to do that, is some of the best advice ever). My SO usually starts with a pretty vanilla insult and they generally increase to evil if it's allowed to progress/escalate. If he appears to be escalating through text, I confront the first insult head on. "You're starting to insult me again", "saying those things is not going to hurt my feelings", "I don't understand why you are trying to hurt my feelings by saying those things", etc. Lack of reaction seems to curb it best, followed by separation (don't text until everyone's cooled off and it's safe again).
In person is a different story. I (irrationally) feel like if he can actually see me, a real person that he loves, in front of him that he won't be able to say such mean things. Yeah--that's not how it works at all. Insults are still possible.
My best advice would be:
1. Don't react to insults. Think of it as dealing with an angry toddler that is throwing a tantrum. You don't sit down and try and reason with an angry toddler having a melt down, do you? No, you let them work it out and cool off on their own before you attempt any sort of discussion or processing. (No disrespect meant to any sufferers, it's just a metaphor that works for me.)
2. Don't insult back. I'm far from the model for a perfect partner. Sometimes, I make mistakes too. I made this mistake one time and I will never do it again. It made me feel vile and immediately remorseful.
3. Be very clear with your words. I don't like being ignored, so I don't like ignoring people. So, if he is escalating via text, I will say something like "I feel like you are escalating/triggered/whatever word y'all use and I don't want to argue. I am going to focus on work for a few hours. I'm here when you're calm/ready to talk/regulated/whatever word y'all use". Then stop texting. Not one single text until they reach out first. That (hopefully) means they are in a more stable place mentally. No matter what she is texting to you or sending you via social media or whatever, try to ignore it.