There are probably as many opinions as there are sailors as to what is the safest way to handle heavy weather. The most popular strategy these days, which is usually possible with accurate weather forecasting, is to stay away from heavy weather.
However that doesn’t answer the question, and doesn’t apply if you take the attitude of lets go sailing whatever the weather.
To simplify your understanding of the options, I make the following comments:
The wind and the strength of the wind per se is not the problem; no matter how strong the wind is, it is not what does the damage, it is always the sea state.
Waves that don’t break also don’t give us any trouble, no matter how large and menacing they may appear.
The waves that will capsize a boat are ones that are breaking, so imagine sailing in surf.
Boats typically capsize in one of two ways:
1. One way is to surf down a wave and broach; which means the boat turns as it surfs down the wave, becomes side on to the wave and then rolls over.
2. The second is to surf down a wave and have the bow dig into the wave in front and the following surf to pick the back of the boat up and the boat tips head over heels on itself, called pitch polling.
The point I wish to bring your attention to here is that for a boat to capsize it must be moving through the water. A boat that is not moving cannot capsize; the wave will simple roll over and under the boat, leaving it harmlessly behind. The thing that contributes most to the possibility of capsizing is the boat’s own speed through the water at the time the breaking wave hits it.
The answer to not capsizing is to be going as slowly as possible. There are many strategies for this; heaving too, lying a hull, setting a sea anchor, etc and they depend on other considerations such as, is there clear water to leeward of you, and what is your preferred course you wish to make good.
There is a golden rule though; slow down! Going fast, being in a hurry or trying to run from a storm may be your undoing.
One of my own experiences of observing how safely going slowly in surf works, was coming over a shallow bar harbor on the west coast of New Zealand when the seas were breaking. As each wave approached us we would throttle right off, slow down with stern to the sea, let the wave pass, then open the throttle up and resume our course. A little nerve racking and it certainly got our adrenalin going, but that was all and we safely made it into harbor.