No they aren't. Last year, 86 civilians were killed by cops in traffic stops alone, with over 1,200 documented killings overall (there is no central database, and NGOs that do this reporting rely on state by state reporting or news reports, so this is a lower limit). In contrast 136 cops died or were killed on the job in total, this includes things like traffic accidents or just keeling over at your desk, not just shootings -- there were fewer than 50 fatal shootings.
In fact, cab driver is a more dangerous job than being a cop by more that 2x. There are 8 cab driver deaths per 100k workers vs 3.5 for cops. Construction work is even more dangerous at 9.6 deaths/100k. Hell, fast food employees die at a rate of 1.8.
So while being a cop is slightly more dangerous than the average job, it's far from one of the deadlier occupations and the level of danger is greatly exaggerated: I wouldn't call "almost twice as dangerous as working at McDonalds" taking your life into your hands. It in no way justifies the level of violence they inflict on the rest of society. If the goal of the police is to maintain a high K/D ratio, then they are doing great, protecting the public from violence: not so much.