To recap here....
It should not come as a surprise to anyone that having gun in hand during an encounter with law enforcement is extremely imprudent, no matter whether one is answering the door, holding a gun on a burglar when the police arrive, or holding a gun at a crime scene after a lawful self defense incident. The victim mentioned in the OP should never have taken his gun to the door before opening it. That cannot end well.
As has been discussed here, opening the door to a stranger is fraught with risk. One should always find out who is there before opening the door.
Having a gun in hand is in no way an effective way to mitigate that risk. The idea that one who has first to assess the situation, make a decision, and react will be able to avoid being overcome is unrealistic.
It adds risk, as in the case cited in the OP, where the man was shot.. And if it turns out to be someone thoughtfully coming to tell us that our rear car window is open in the rain, and the gun is seen, we will have some 'splainin' to do, so say the least.
Yet people do it.
Ryan Whittaker did it. We will never know what he thought he was going to do with that gun after opening the door. Clearly, he had not thought it through
Whether the officer was justified in shooting him doesn't matter. He is dead.
The Whittaker video does tell us something useful. It appears that Whittaker had decided to put the gun down, gently. He took too long.
If first responders happen to arrive before we have re-holstered after a defensive use of force incident, and we should not let that happen, we need to get rid of the thing immediately--to drop it if we have to. Every tenth of a second makes us a target, and very likely, a lawful target.