As far as I know; this is common knowledge.
A better question would be; how to recoup that money via a lawsuit for wrongful imprisonment in the first place.
No citizen should have to bear the cost of bad police work or a corrupt prosecutor - ever. The city, state or federal government should pay that cost every time.
We citizens are not little puppets on a string for those in power to do with what they may. There needs to be an equalization. In this case; remuneration for any funds lost including bond, loss of work, loss of career, etc.
I imagine it would make the next over zealous person in power think twice about doing something as stupid as this.
Just sayin’...
I wonder if that Justice of The Peace will be re-elected.