An extremely unlikely event or emergency; a worst-case scenario (literally 'one in ten thousand').
万一に備えて保険に入っておくべきだ。
You should have insurance in case of an unlikely emergency.
万一の事故に備え、避難経路を確認する。
Check evacuation routes in preparation for an emergency, however unlikely.
An adverbial use meaning 'in the unlikely event that' or 'by some chance'—similar to 'if by any chance'.
万一に備え、連絡先を家族に伝えておいた。
I gave my contact information to my family just in case.
万一遅れる場合は、電話をください。
If you're going to be late, please call—just in case.
万一のことがあれば、この書類を持ってきてください。
If anything unexpected happens, please bring this document.