The fact that Cohen is a lawyer would seem to indicate that the case was solid enough that he was concerned he would lose on merit. However, a friend of mine who is managing partner in a legal firm says that "Once a trial goes to a jury, it's approximately a coin flip as to who will win, and the odds only go down from there." That's mainly because if the case is black-and-white, then there will be some settlement/plea deal prior to a trial.
However, Trump has put himself into a corner where he probably cannot accept any plea deal other than one that would drop the criminal charges but keep any misdemeanor charges. I'm not sure that the NY DA, Alvin Bragg, would be willing to do that unless the case starts falling apart. But in the case Trump will push for an aquial rather than a plea deal so that he can use it to rile up his base.