Each year more than 250,000 civilians are injured by police. At least 600 are killed. between 2014 and 2019 there was an average of 245 officers shot per year, many of which were injuries only.
It's extremely clear that in an average encounter a civilian is much more likely to be shot and kileld or injured by police than the other way around. Gun violence against police is extremely rare.