You would be mistaken in that assumption. Police in the US receive a fraction of the training provided to their counterparts in Germany and the UK. This is across the board, all types of training. They receive even less deescalation training, and in fact sometimes receive the exact opposite (training akin to "police as warrior").
Being a supervisor where work involving heavy equipment is happening is can be more dangerous because you're not as familiar with all the heavy equipment around you and depending on how much of an ass you are or aren't your team might not be comfortable speaking up when you do dumb things. It definitely depends on the supervisor though.
That said, the numbers don't lie. Policing is not nearly as dangerous as it is made out to be.
Carrying the gun knowing that stress severe impairs your perception and executive function means negligently putting public in danger akin to drunk driving.
Training should equip officers for the not-uncommon case when a suspect has a knife but is otherwise nonthreatening.
A knife is a deadly weapon. Even a non-deadly strike from a knife means a loss of organs (lung puncture, liver intrusion), limbs, facial tissue, eyes, etc. If someone is threatening with a knife (attacking cop cars, etc), especially if they are not acting entirely sanely, they are an active life-or-death threat and yes, you might absolutely be walking into the moments before your death.
Even if you have a gun, you have at best a few heartbeats to make a judgement call if they decide to lunge for you. Especially if your firearm is in it's holster, in the time it takes for an attacker to lunge at you, you need to:
1. Establish a positive grip on the firearm
2. Defeat any safety measures on the holster (snaps, buttons, interlocks)
3. Clear the holster with a duty sized firearm
4. Draw firearm to combat position
5. Secure off hand grip to firearm
6. Obtain sight picture
7. Check target and backstop
8. Squeeze trigger
The person who intends to kill you meanwhile needs to do the following:
1. Lunge forward with knife angled outwards
If it's available in your area, I recommend taking a use-of-force seminar and seeing how well you do with the above kind of scenario.
Yes, it'd be great if cops could bear hug everyone into submission, but that's not the reality of the situation.
Becoming a police officer is akin to stating: "I will approach confrontations level-headed and try to deescalate" and I'm sure police officers receive training to that end as well.