You can prevent this problem by maintaining an FC level in the pool at all times. Obviously you can't easily add chlorine, let alone mix it well, in a pool that is frozen over, so the next best thing is to wait to close the pool until the water temp gets as cold as possible -- at least below 50ºF. At that point, chlorine will last for quite some time so if you close with a shock level of chlorine or even a higher than normal level, it should last through the season. This is especially the case if you use a pool cover that is opaque to sunlight. If your pool is exposed to the sun, then the chlorine will drop even when the water temperature is cooler.

I know that in my own pool the chlorine loss drops to less than 1 ppm FC per week when the water gets to around 50ºF and I suspect that when near freezing the chlorine loss rate is less than half that. However, I have a mostly opaque safety cover.

You should then open the pool before the water warms up, so definitely before it gets above 50ºF.

There are other ways to avoid the problem that involve the use of supplemental products (PolyQuat 60, for example) at extra cost, but the above method using chlorine alone is simple and inexpensive.