https://youtu.be/HA-h73xDqXU" onclick="window.open(this.href);return false;
The railways in 1945 were in a terrible state. The war years had been very damaging. First there was actual bomb damage. German attacks damaged the system from time to time. Repairs to the track and stations were not of best quality. Secondly the trains were worn out from intensive use. Thirdly steel for new rails was not always available because weapons had priority. New carriages were not being built. Troops were moved in large quantities, taking carriages out of availability for "normal" use. Tanks and other military supplies were carried to places where the infrastructure had not been prepared. In many areas rails were worn and speeds had to be kept low.
I can remember a long trip by train in 1944 - from the London area to my mother's relatives near Glasgow. The journey was at night but the "sleeper" was in fact a normal carriage slightly modified. I am reasonably sure that the journey took much longer than it would nowadays. I can remember lying on what was clearly a normal seat being used as a bed.
The war had interrupted a period of modernisation that in the 1930s had intended to see a large investment in electrification and a phasing out of steam. No investment of that sort took place until the late 1950s. Note that electrification was the natural choice as it did not need imported oil.
There was a general recognition that steam was unsatisfactory for all the reasons that have been mentioned here from time to time. But the needs of the war had prevented further extension of electric traction. The Southern third rail system continued but was not extended. Few other electric sections existed. There were a few that had been installed in the 1930s almost always as experimental systems to assess their suitability. (These have all been phased out now.) The next stage would have been in the 1940s if war had not occurred.
There is nothing romantic about the persistence of steam into the 1950s. It was simply the lack of money for investment caused by the war and the aftermath.
The postponement of electrification until the 1960s had the useful effect of adopting a much better system than was being proposed in the 1930s. We can compare this with the electrification in the US where many of the existing electrified lines are stuck with out of date, inefficient electrical systems, which should have been modified to international standards in the post-war years.