The real culprit here is the prosecutor. If cop perjury led to prosecution, conviction, and heavy prison time for the perjuring cop, then false testimony from cops would cease.
Police, like most people, respond rationally to the incentives in front of them. If they are rewarded for arrests, and not penalized for lying in order to get those arrests, then many will lie.
And, judges. I have personally witnessed two cases in which the cop lied on the stand about facts material to the case (perjury) which led to the dismissal of the charges and the only thing the judge did was to give the lying cop(s) a stern talking-to.
If you talk they can claim "knowing more" and can bring charges to get their truth.
If you say nothing they cannot make false claims against you to a grand jury.
They will spin every single word you say, "every single word".
Most evidence is almost always never enough to convict unless you plea for innocence.
The best defense is always, STFU. It's a legal right they cannot blame you for.
Just a few thoughts.