Sweden actually has a similar problem even without the bail system. Most people get released awaiting trial, depending on severity of the crime, risk of influencing the case, etc. The ones who don't end up incarcerated with way worse conditions than regular prisons while waiting for the trial. You might end up with a sentence of 1 year after already spending most of it in an insitution with limited visitation rights,…
So poor people cannot complain about things like government excess or police brutality, since those complaints get thrown out. Nor can they effectively get police help, except in very severe cases.
But a rich person can drag you in front of a criminal court for not wiping the pavement in front of your apartment often enough.
This is a bail system. The money you put down, you get back if the person gets convicted. Additionally, in some countries the defendant, if convicted, will need to pay your lawyer expenses (again, if they are convicted).
Pretty much all of Europe.