i remember seeing some old film footage of thousands of commuters coming off trains at a number of the London stations, from the newly burgeoning suburbs, commuting by rail into the cities isn't a new phenomenon. A number of family members worked on the railways, pre and post WW1.
it is true that homes were built for workers locally, especially in mining and heavy industry.
from wiki
19th century London was transformed by the coming of the railways. A new network of metropolitan railways allowed for the development of suburbs in neighbouring counties from which middle-class and wealthy people could commute to the centre. While this spurred the massive outward growth of the city, the growth of greater London also exacerbated the class divide, as the wealthier classes emigrated to the suburbs, leaving the poor to inhabit the inner city areas.
The first railway to be built in London was the London and Greenwich Railway a short line from London Bridge to Greenwich, which opened in 1836. This was soon followed by the opening of great rail termini which linked London to every corner of Britain. These included Euston station (1837), Paddington station (1838), Fenchurch Street station (1841), Waterloo station (1848), King's Cross station (1850), and St Pancras station (1863). From 1863, the first lines of the London Underground were constructed.