No they don't. It requires a fourty second google.
17 3f: "(f) in the circumstances described in Article 5(4) of Directive 89/391/EEC;" ('exceptional and unforseeable circumstances' including war)
17 3g: (g) in cases of accident or imminent risk of accident.
Additionally, Poland has an opt-out anyway.
Furthermore, I'm fairly sure there's a directive that allows member states to bypass EU Labour laws at a time of 'national distress' where the state is at direct risk. Aka war
Who tf teaches you