I think we get caught up and stuck in the way we react and interact, even though we know better and want to do better. It's a form of conditioning and we get a payoff. Doesn't have to be a positive payoff, just a payoff. Usually it is in the form of attention, which can be negative, but if person is looking for attention, even subconsciously, they will seek out what works.
No offense hopefully, Regret, it is easier, I think, for me, because H and I are separated, live separate lives and I have the distance to take time to respond and act and think. You don't and you are doing remarkably well.
When I am with him, as I mentioned yesterday, stuff will come out of mouth. But I make sure I amend, or apologize or use "Wait a minute, that didn't come out right, let me start again" And usually I will start with a compliment for him.
So, you can use the "Ugh, that didn't come out right, let me start again" technique. If mention of Mom's BF's D set him off, say. "My bad, let's start again...wow, what a great/horrible day...and laugh a little or give him the smile you reserve for him (we all have one and let it go. It seems you are really trying to direct things still. Let it go a bit. I am such a control freak that I have to constantly check myself