In the absence of a free and fair judicial process at all levels, you don't know that any particular person is a criminal, and hence cannot treat them as such. You cannot legitimately separate society from its agents in such a case.
The system wasn't perfect. But that's why we have juries. Presumably they would reject confessions made under duress.
But I disagree with you on whether we can separate society from its agents. You have outlines a scenario in which police officers commit a crime against an innocent person. Surely it is in the interest of society to punish the police officers. Just as it is to ensure the innocent person goes free.
But let us take a case more clearly analogous to the case sub judice. A police officer makes errors in the process of getting a warrant. No, let's make it even more egregious. Without procuring a warrant, a police officer searches a house and finds a dismembered body in a trunk. An investigation ensues and all evidence points to the house's resident as the murderer.
Do we throw out the evidence and let the murderer walk? (Assume that all evidence is "fruit of the poisonous tree".)
If we do, who suffers the consequences? The cop? No. Society? Yes. The murderer's next victim? Certainly.