Break your scenarios down to one step at a time, then perform that step followed by the next step. Minimizing the risk and controlling the situation is what you need to do. In the end the highest priority is to exit the water, not just the cave but the water. Example:
The kitchen sink is filling up, The dog is barking at a person knocking on the front door, the telephone is ringing with no answering machine to pick up but the call display tells you it's an important call, the baby is crying in the crib and your arms are full of groceries. What do you do?
Some things can be done simultaneously others cannot.
What is most important?
In this scenario many would say the baby. Actually no, the baby you can hear crying and therefore is generally ok subject to the type of cry but at least he/she is breathing. You might however want to shut the water off early as the results can only add and worsten your situation increasing the stress, to do that you need to put the groceries down, you can yell at the guy at the front door to wait as you shut the water off, now no longer a stress builder. Grab the telephone if you want and tell the person to wait or better yet just let it go, you know who called, so call them back when things calm down by doing so you remove at least one more stress builder. Go get the baby, bring he/she to the front door calm down and control the dog, you may need to put the baby down again to do this, but only temporarily and then answer the door. While holding the baby start putting away the groceries as you talk to the guy at the front door.
What have you achieved? The baby is happy, you stopped your kitchen sink from overflowing, groceries are put away and you have addressed the guy at the front door. The telephone and the dog are minor concern that could have contributed to building stress and causing more problems. The dog at least in the end can help get you back on a comfortable footing.
You get the idea?