As the article mainly states, this isn't just because Trump can't help it but also as a strategy to make it easier to get a favorable appeal. Plus, it would stoke his favorite way to portray himself, as a victim, and fundraising:
there have been recent conversations among some of Trump’s 2024 campaign brass of how much of an immediate fundraising boost they would enjoy, if a New York judge were to try to put Trump in a cell for even a minute. “All the cash in the world,” one Trump political adviser says.
I think the solution here would be for the judge to go after Trump’s lawyers. From the article they’re engaging in some of this behavior themselves, in addition to encouraging it in Trump. But, they want the optics of Trump getting imprisoned in order to play victim and try to help an appeal. Seems the judge could side step that and go after the lawyers instead, who have more to lose.
It seems like putting a lawyer in jail would just be a recipe for delaying a trial though. They can't be expected to provide defense if they're locked up. Or do they just require you to find new counsel?