As confirmed in interviews with Rev. Awdry, the Railway Series initially grew from a nursery rhyme told to his sick son in 1942, normally called "Down By The Station". This dates in published form back to at least 1917 (there called "Call the Roll"). Later on in the first Railway Series book (The Three Railway Engines) we have another nursery rhyme, a limerick:
Once, an engine attached to a train
Was afraid of a few drops of rain—
—It went into a tunnel,
And squeaked through its funnel
And never came out again.
From which the third story in the book, The Sad Story of Henry, grows. The implication I've always had when reading it is that this was another popular nursery rhyme in the Awdry household, which the reverend crafted the story around. Trying to search for the poem on its own, though, unlike Down by the Station, seems to inevitably link back to The Railway Series; except for a site claiming that the reverend himself once received a letter stating the limerick could be found in a 1902 book of children's nursery rhymes, in the form
Once an engine when fixed to a train
Was alarmed at a few drops of rain,
So went 'puff' from its funnel
Then fled to a tunnel,
And would not come out again.
So, does anyone know the name of this 1902 book? Does it still exist? Or are there any other published versions of the rhyme that predate The Three Railway Engines?