Luckily for us, most police officers aren't afraid to go out in public.
I can't speak to it with anything more than speculation but I don't remember a single instance on par with this one. Not saying that multiple policemen haven't been killed in a since incident, but not in this kind of manner.
In any decent sized department, there are bars that are "cop hangouts". Anyone who wanted to kill a whole bunch of cops could easily do it. It doesn't happen because rational people don't attack police, they respect them and are thankful they're around.
Cops aren't different than other people. They hang out with the people they work with, at work and away from work. Cutting that back cuts off one of the biggest benefits we get from them, which is the IDEA of deterrence.
What you're advocating is similar to the idea that the military needs to be kept safe. It's not the job they're hired for.