הכל בידי שמים חוץ מיראת שמים
More relevant, and I haven’t seen mentioned on DDF, is הכל בידי שמים חוץ מצנים ופחים. I take this to mean that no matter how pious one is (Mikvah, Minyan, etc), if they don’t take the necessary precautions they could still get sick.