"What if they gather a piece of evidence proving your innocence but keep it secret to convict you?"
What if several years after bring convicted, sentenced and jailed, it comes to light this is exactly what happened?
Actually you don't need a 'what if', because this has happened on multiple occasions.
Police corruption isn't just taking a backhander or letting some influential person (or their kids) off on serious charges because it might embarrass the establishment. Nor is it framing up some innocent person because they embarrassed the hell out of a racist senior inspector.
The most common type of corruption in policing - which also happens to be the most corrosively dangerous kind of corruption for society as a whole - is "noble cause" corruption, where the people concerned are convinced of their righteousness often feel they're "on a mission" and feel they have to break the rules for the greater good. It used to be summarised as "He's a bad man and he's done lots of bad things we can't put him away for, we need to make this one stick no matter what"
It's the kind of thing which resulted in miscarriages of justice like the Guildford Four and the Birmingham Six, amongst many others.
https://en.wikipedia.org/wiki/Noble_cause_corruption makes pretty interesting reading: Perhaps you can recognise people in your local county LEO from these descriptions.