Every criminal defendant (at least for felonies or serious misdemeanors) in the US has access to a government-funded lawyer, if they can't afford their own. There are over 15,000 public defenders in the US, who get a fixed salary as you mention. They are often overworked, and have limited time and resources to help the people they defend, but they help countless people every day. I'd like to improve the funding and the number of public defenders available (and of course decrease the number of people on trial for nonsense). I'm glad the system exists. It's helped friends and family, with largely positive outcomes that I don't think would have been any better with an expensive private lawyer. When it comes to more serious crimes, you probably don't want to be in that situation.
One relatively easy fix is to bump up the budget for public defenders, including a decent pay increase. You'll attract better talent and have more of them so they aren't as overworked.
Saying it would be an unjust prosecution should include something to back it up; the most logical outcome is that if both lawyers are just as skilled the little edge they may have by actually having a innocent defendant -or a gilty prosecuted- would help get better justice overall, I don't think I could even be persuaded otherwise until I can read about a real world nation where such system was tried and failed.