You're suggesting that police officers would face a significant danger merely knocking on the door of a gun owner's home, which is silly. Just because someone has a gun doesn't mean they're going to unload on
anyone knocking on their door, much less a uniformed police officer.
Also: 2/3rds of Americans don't own a gun, and only 44% even live in a house with a gun.
Ever notice that only in a very small number of cases does a "swatting" result in any danger to the officers, such as the homeowner shooting an officer? The number of times this has happened is in the single digits. Hint: that's because there's little danger to police responding to these sorts of calls.
In fact, there's very little danger to police officers in the US, period. They have a murder rate lower than the general population, because people know that cops don't give a shit about when you or I are murdered (nation-wide the clearance rate for homicides is abysmal, one of the lowest in the developed world) but if a cop is killed, the killer will be correctly identified, found, and arrested within hours.
Being a cop in the US doesn't even rank in the top ten in terms of deaths on the job. Retail workers and cab drivers have a far higher homicide-on-the-job rate;
Pre-COVID the #1 killer of police, overwhelmingly, was traffic collisions, suicide, and heart disease.
During/after COVID, the #1 killer, despite police getting first-in-line access to the vaccine, was/is COVID. Completely preventable.
The reason these "swattings" are so dangerous is because police show up expecting a dangerous situation, confrontation, even though it's incredibly rare.