I have an idea that should help in a number of ways. Let's do let the courts figure it out. Take this case as an example. He goes to court and is found guilty. Sentenced and done. But it he is found not guilty he has to be put back to where he was before the arrest. No record. Compensated for lost wages and new job if old one is not available. All at the expense of the arresting department. First benefit of that is the arresting department is gonna make sure of what they are arresting for so no more BS arrests and "let the court figure it out. Second benefit is the courts won't be flooded with "figuring it out" so DA's can actually do their jobs and stop plea bargaining cases they don't think they can win. The best benefit is people who did nothing won't have their lives destroyed.
Ok so I am no J. K. Rowling but it was a nice thought while it lasted.