A better idea is common throughout the world.
Look, I'm fine with people advocating through the judicial process, but all things considered, of all people who are 'disadvantaged' in their legal proceedings and should 'deserving' of receiving government-sponsored legal aid (because there already is legal aid in this case, to the tune of <however much this amount in OP says right now>), this case's (and defendant's) scorecard looks pretty weak.
Of course, there are some glaring issues here, such as the fact that unfortunately there's a strong correlation between socio-economic status and the odds of you needing legal counsel... Something which also occurs in healthcare but to a much lesser degree I'm inclined to believe.
there is a reason why non automatic appeals are not free, else those convicted could simply keep their cases open at cost to the tax payer when guilt had been properly assessed.
Neither are automatic appeals, or this whole thread wouldn't be happening. The appeal here is automatic.
In this context "afford" typically means you can still keep your home/apartment and go grocery shopping.
That also has the added bonus of making people think twice about engaging people in civil suits and prevents people and bad prosecutors from using the legal system for blackmail.
If I were to barely break even at the end of each month, and was tried for a crime I didn't commit I might still consider pleading guilty because the actual punishment would be less than the results of the financial penalty incurred by defending yourself and losing. If I were rich enough to easily pay the fees should I lose, I would risk it.
Would having to pay if you lose help, too? I imagine there would be fewer lawsuits then. I don't have any data to back it up, but it feels like the U.S. has the most lawsuits/capita. Other countries where you have to pay if you lose don't have that many.
Anyway, it definitely doesn't feel fair that you need hundreds of thousands of dollars for a good defense. That's why most people tend to take the plea deal even if they are not guilty of the charges they bring, or if they are "guilty" but only through some twisted interpretations of the law and the prosecutors, which could be invalidated in a Court, but they can't risk it (especially when the prosecutors tend to charge them with 10 different offenses and 30 years in prison for the least violent of crimes just to scare them into taking the 6 months in prison plea deal).
The U.S. prosecutors seem to be acting exactly like patent trolls - or the mafia: "We won't take you to Court if you just pay this small sum - or go to prison for this small amount of time."
At this point one might object that lawyers make too much money, but then I'd like to say that most everybody on this site working for a big company, or working for their own, costs this much or charges this much (or should charge as much, if they're 'professionals' and not 'I can set up Wordpress'-style workers).
Also, let's say that there are no expenses, i.e. only lawyers who live close to wherever the cases are heard (no plane tickets, no hotels), that all proceeding are in the same location, that the defendant is held somewhere close as well, that everybody working the case drives cars that run on air etc.
So then we have ~ 6 months, for a single person with some part-time help to do the menial stuff, to research the case, prepare all briefs, do all trial prep work (I don't know anything about this case but let's say you want to call 3 character witnesses. That's a week right there just selecting them, convincing them to come, prepping them, filing the paperwork etc.); to do the PR; to work with other stakeholders; the actual proceedings (which might span several court sessions - motion for this and that, pre-trial hearing(s), the actual trial, etc. I think it's clear that a single person can't do all of this in 6 months.
It's just what things cost in the real world. But hey, it could have been worse, you could've gone to court in Europe - in which case you'd get to pay between 15 and 25% VAT on top of it (probably not in all European countries, before someone jumps on that).
So, I guess your idea won't work. Either the legislature thinks up front and publishes 500 pages, or the courts have to fill in the blanks between page 5 and page 500 themselves.
It's not acceptable, but nobody has any better ideas.