The law is, and should be, B. Retailers that wish to avoid future hardship can prepare by pre-stocking some replacement parts like in C, but I don’t think laws should protect retailers from their poor financial choices. The law should strictly, and extremely, protect the consumer.
There is a lot of merit to this view, but there is also a major problem: rules like this make it substantially harder to start a new business due to increasing overhead and complexity, which is bad for everyone long term. Such comparatively more complex and burdensome regulation is why so many (but not all) startups go to America or Israel instead of Europe.
To address this I prefer ultra low friction and ultra low cost regulations over complex and performative schemes. For example, GDPR requires the appointment of a "data protection officer" in some cases, which is mostly just an extra fee for small companies. Instead, it should only regulate the rights (such as to be forgotton, etc.). Appointing such an officer is mostly performative.