You are asking a very good question. There are hundreds of such questions, and people who shoot and carry should think about them and discuss tactics continuously. Probably the only quick answer to your question is that carrying a firearm requires continuous attention to surroundings. Any shooting, even if 100% completely in self defense and justified, will cost the shooter time and money and at least one trip to the police station.
The specific answer to your question is that a shooter should always be aware of his backstop. Whether one can control the shot depends on the circumstances. There are bullets that reduce over-penetration (called hollow point bullets) and there are bullets that shatter upon impact (frangible ammunition), but they will not stop a missed shot.