That’s true, but it doesn’t change the fact that the perception of risk seems to be greatly skewed in the minds of officers and the public alike. About 50 officers die each year at the hands of criminals. This is compared to them killing about 1000 citizens on average each year. Reports would seem to suggest they kill more unarmed citizens than officers are killed at all.
Not certain how many officers are injured compared to citizens injured.
From that 1000, you would need to separate out the people who 'deserved' a police killing, due to legitimately threatening the lives of the public or of the police officer.
That’s difficult since the investigations are usually not available to the public and mostly rely heavily on the officers account. Certainly another area we need to do much better.