How can it be fixed?
How about expanding the right to council to equivalent resources? That way if the government spends a million trying to convict someone, they have to make an equivalent level of resources available to the defense.
Since pleading out is much less expensive that jury trial, the current trend of forcing defendant to plead out will become overwhelming - basically, a mere fact jury trial would mean complete failure for a prosecutor ("you let that sucker have jury trial and cost our department whole next year budget?! good luck getting promotion anytime this century!"). They would behave accordingly - given that by now we have 5000 federal crimes and more will be inevitably created just for this purpose, standard scenario would be "we got you for 95 counts of federal crimes, summarily you could get 280 years in jail. Even if jury throws out 90% of them, you are still in for 30 years. How about accepting this one 2 year charge on the cheap and we are done here and now?"
Also, government wouldn't usually spend a million. Locking down someone's assets costs nothing do the government. Setting excessive bail and denying him opportunities to defend himself is also very cheap. So this measure would create incentive to concentrate on such methods of winning the case - why bother with expensive forensics if you can bankrupt him with asset forfeiture and he'd have no money to pay for a lawyer that would ask questions requiring expensive forensics? It's not the question of money, unfortunately. It's the question of vastly asymmetric power.