What if, hang with me for a second, a lot of the threats police face (real or perceived) is due to the way policing is conducted?
Like, why send people with guns who can ruin your life in any number of ways to enforce tail light regulations? Can't that be done by the same people who enforce expired parking meters? The last time I had a busted tail light, the officer wrote me a summons and it was dismissed because I fixed it and showed an officer at my local precinct the next day. Why did 2 people with guns have to take positions around me to issue said summons?
A lot of it has to do with how U.S. government is structured. And perhaps a bit to do with the physical geography of the country as well.
Having multiple divisions of police in a large urban area is probably reasonably possible. And, to some extent, it exists. Parking enforcement is an example, as is the experiment the New York is doing with a mental health response team.
But most of the country does not resemble New York or Chicago. as towns get smaller, so do the amount of resources they have for emergency services and law enforcement. You get down to having volunteer fire departments, for example, because the budget doesn't allow for a full-time standing force. So if you have a budget to support five officers total, it's not effective to make one parking only, one two traffic patrol, and two criminal enforcement. You won't be able to have coverage at all times for any of the areas. It's more effective, in theory, to hire five officers who can handle all three (criminal, traffic, parking). Oh, and also be the first responder for medical emergencies because the nearest hospital\ambulance service is in the medium sized town 20-30 minutes away.
Of course, the State Police might patrol the state road that makes up the main drag through town, but they don't go into the residential areas to enforce the school speed zones. And, on the criminal end, they may be quite a ways away when the call comes. Which is why a small community may decide to have it's own small force instead of rely on state or county forces in the first place. If small towns want a guarantee of a level of patrol, they have to do this. Or pay. There is at least one small town around here that I know pays the county sheriff's department to patrol their village.
I don't think its an unsolvable problem. It mostly involves reversing the structure of U.S. police forces to be designed from a top down viewpoint rather than ground up.