(Hypothetical)
Rob is charged with a crime. His lawyer, upon receiving discovery, realises that they are very unlikely to win the trial if they plead not guilty, that the best course of action for Rob is to plead guilty and get a sentence discount.
But the lawyer knows that Rob has money and wants to suck it out of him, especially that he knows Rob will be jailed anyway. So he encourages Rob to plead not guilty by saying they have good chances to win.
What would be the best way for Rob to detect that, if any possible?
Are there any working protections in place that would secure Rob from going on trial with unscrupulous lawyers like that? Or can they always get away with it?
(Any jurisdiction)