Like the Dr. said when the patient said, "it hurts when I do this". Dr. said, "then don't do that".
It can be either. you can check by putting some paper towel in the bottom of the air filter where it can't get into the intake. When it stalls, check and see if that is wet. Or seal and put a snorkel on.
You can also spray some water around the engin compartment when it is running. There is a vent on top of the distributer cap (if you have one) and it can lose its seal and let moisture in. A new cap should change that. If it is that, you should have to dry it out to get it to start again.
Depends on how high the water is and what you mean by hitting it hard. If the water is getting up to the area of the ignition, you will need to seal it completely. That is a detailed process and need to have the right material to seal it with.