There hasn't been an outbreak of the scary disease known as rabies in Japan recently but considering ????, if you get bitten by a dog you must go to hospital.
Jisho gives the following translations for もしものこと: 'emergency', 'accident', 'rare possibility', 'unexpected occurrence'.
From the context 'rare possibility' seems to fit best, but I guess 'emergency' could work as well. Are either of these correct? 'Emergency' and 'rare possibility' are two quite different meanings. Is there a better way to think about もしものこと?