when the engine was parked outside (as was mostly common in Russia as most sheds were destroyed) (it was called "Kalt stehen - standing cold") the chimney would be covered, the ash pan was closed, the cabin doors closed and all valves to the cylinders shut. The engine could then rest for a prolongued perior under hot steam without freezing. The water in the tank was heated by steam, no electricity involved, this would reduce the time it could rest, though.
Steam would push into the tank and heat it. Water was sucked into the injectors to feed the boiler by steam also with the help of underinflation/negative pressure due to the steam flow through a valve.
In short the advanced frost protection included: double cabin walls, chimney covers, heated cabin floor, glass wool or similar material for insulation of the water tank, cylinders, steam and water pipes, especially the feed water pipes running along the left-hand side of the engine), the Knorr Pump's top section and general insulation of pipes. Also, you will notice that around the Knorr pump, on many engines there were pipes outside and around it. They were all/most placed below the boiler cover for frost protection. Later engines had them hidden in general.