Your civilian scenario isn't exactly congruent because you are missing the legal authority point. If you are a civilian with the authority to search a building (your house when you hear a noise at night for example), then you you would be justified in clearing the building in the same way the police did. The response of deadly force depends on if there are alternatives to that use of force (and greatly varies by state). In this case, the alternative to the occupant using deadly force is to comply with the warrant, and if necessary, sue in court for any damages.
My impression of developing countries was that police are vicious, brutal, and corrupt by default. As opposed to the US where bad cops are the exception. And they have very little oversight. Which countries are you talking about where that's not the case?
I wonder if things like this are what honor duels were about in the past? A way to semi-legally call out someone personally with potentially severe consequences.
Pointing a gun at a kid in a situation like this seems like it should be punishable by itself.