The problem is that this is a strategy, and it might work. The judge is showing signs of exasperation. The defense is laying the grounds for an appeal based on judicial bias. Viewed in that light, each time the judge interjects out of annoyance or exasperation is citable evidence. It's funny, but it is also rather dangerous.
The judge needs to calmly and patiently explain to Trump that he will be jailed for contempt if he doesn't follow the rules and act in good faith, and then dispassionately follow through with that consequence.
Don't threaten him, don't cajole his lawyers to constrain him, don't complain about his behavior. Just give him a time-out, like the petulant toddler he is, until he gets it through his skull that his bullshit won't be tolerated.
Once he comes back, if he won't agree to behave or if he does promise to behave and then breaks that promise, simply immediately put him back in the cell for another round.
Trump needs to see the inside of a holding cell for a while in order to act right.
As much as I'd love to see it, jailing him for contempt would play right into their plan. He wouldn't see 24hr of cell time before his fanatic base would be whipped into violence, painted as political persecution of the GOP (defacto) nominee
It's all paper thin excuses to anyone with critical thinking, but we know it'd be a successful ploy.
What the fuck is the national guard for then? It's the correct and legal punishment, and it's a matter of national security. These concepts are not conflicting.
I don't think it's a strategy, it's just a happy potential by-product, albeit an unlikely one.
Sure it's possible that a judge might make mistakes that may form the basis for a successful appeal. Is Engoron more likely to make mistakes because of Trump's antics? Not necessarily. Most people do their best work under pressure.
Trump's behavior is focused as always on his supporters. The more he appears to be persecuted the more his supporters will throw money at him - it's that simple. He's intentionally pushing the judge as far as he can without crossing the line into actual consequences.
Edit: as an aside the photos of these idiots always makes me think about how much time they've spent practicing their facial expressions in a mirror.
Not just wasting the judge's time, but yelling at and insulting the judge on the stand. I'm no lawyer, but I doubt this is a legal strategy that any reputable legal professional would recommend.