To start with, it's good that you recognize this as an issue - it certainly is, and it's something that is very important to find a solution to that works for all parties. What you're describing is not a relationship that will work well for any of you; fix it now, before it's too hard to fix.
What follows is my experience, and how I'd suggest you and your partner handle things, once you have your partner's buy in. None of this will be possible without your partner being 100% in agreement that this is a problem and that this is something they want to fix. So first and foremost, you need to find a way to get to that point. Therapy, counselors, parents, pastor, whatever - or just talk. You have to get your partner on board, or this won't work no matter what you want - they're a person too, and they have their own ability to act independently, and you have to respect that, even if what they're doing is wrong.
I've been the person on either side of this, to a lesser extent, more often than I'd like to admit. I don't come from a "disrespect" mindset by any means, but I absolutely can have interactions where my child is doing something that makes me frustrated. Often that's not the child at all, but it's something else - high stress levels from something, or not enough sleep, or too much caffeine - and then an inappropriate interaction with the child ensues. Yelling, or punishment, or whatever - something that's not appropriate for the situation.
For me, I'm self aware enough that typically as soon as I've had a few seconds away from the interaction, I'm aware I didn't act appropriately. I immediately apologize to the child, let them know I acted inappropriately, and that I shouldn't do that. I don't address the behavior on their side at all at this point; even if they were also behaving inappropriately, it's not right to focus on that at that point - I'm bigger than they are, and older, and should know better; so it's on me, first and only at that point.
My wife and I are on the same page in this, and we both have about the same level of difficulty - neither of us are super quick tempered, but we're both imperfect and make mistakes sometimes. We also discuss this frequently, and we've both talked about what is appropriate for the other to do.
Sometimes, I'm aware that things aren't going well, and I ask my wife to step in (or she asks me). This happened today for example - my older son was angry at my younger son, and hurt him, and I was upset (naturally), and jumped to punishment. This isn't our preferred parenting style - but it's easy to jump to when frustrated. I spoke to him, he was upset; I realized that it wasn't working out after a while, and that I was too frustrated, so I brought my wife in. She, coming from a calmer place, was more able to use her tools to get him to the right place without punishment.
We've done this enough times that it's not something that is an issue for me. I don't feel like she is taking away my ability to keep up good behavior; I feel instead like she's being my backup when my primary tools aren't working. But it didn't start that way for either of us - we both went through periods that we felt the other was undermining each of us. We both learned, on either side, how to more effectively step in and how to accept help.
We do sometimes step in, as you've described - and it doesn't always go well, in any specific interaction. When one of us is really over the top frustrated, yelling, etc., it's natural that any interference will add to that - it's too hard to see clearly when the cortisol levels are high. But we both do it anyway, reminding the other that we are over the line, and we're at the point that we can accept that from each other - not always happily, and sometimes we disagree with whether we're over the line or not; but in the long term, odds are if my wife stepped in I will agree a few hours later that she was right.
But at the end of the day, the important thing here is that we're on the same page with parenting strategy, we both agree with the approach we're taking 100%. Maybe not in the micro details, but at the high and medium level we definitely agree completely. Because of that, we both know the other is well intentioned, and we treat each other that way; when I see my wife getting stressed, I step in to help her, not to stop her, and the same in reverse. If you're not on the same page, or if you treat your partner as if they are not an equal in this, this won't go well for you. Get their buy-in, just as you'd get the buy-in of a peer at work or a manager for a project you want to accomplish.