Unions are boogeymen for these issues. They advocate for members by design so that is easy to do. The problems affecting police in states that prohibit collective bargaining for public employees or where private police are the same.
And in their blind advocacy for members they are advocating for things that are at odds with what is good for the people their members are supposed to serve therefore they are a problem that needs to be solved and cannot be left out of this.
Civil service employees don't make policy, nor do their unions. A union can demand 25% raises and get 2.
Nevertheless, the union is a symptom of a very deep problem that will not be solved by half measures. If you build a true public safety service to replace the police, you can expect their union to look normal, not like a big city police union.
Police unions exacerbate the problem. But they aren't the root cause. Their leadership is supported by the rank and file. And police unions act much more antagonistically in comparison with other public unions.