You also missed the part when, after the deposition was over, Trump’s lawyers, who we all know now are incompetent and inattentive to details, immediately sprung up to confirm that they were now off the record. They knew what he was going to say.
That means they had to plan it. Trump must have gone to them ahead of time and said “I’m gonna call her a cunt straight to her face, and there’s nothing you can do to make me stop”. So they had to enact a strategy to make sure it didn’t get into the record. And then, they probably had to snicker a bit to prove they thought the joke was totally OK and they really got her good.