I have never thought about the cleanliness of railway carriages in the Victorian period. However, after being alerted to the presence of interesting railway material in the British Medical Journal, I had a browse and a letter from August 1896 showed me that unclean passenger accommodation isn't uniquely a peril of modern railway travel:
'SIR,-Let me ask your assistance in removing a possible source of danger to public health, and in remedying a state of things existing in our midst highly discreditable in this age of sanitary progress.
The condition of some of the carriages on that section of the London, Brighton, and South Coast Railway running from Victoria to London Bridge vid Sydenbam, by which I have of late been frequently obliged to travel, is very disgraceful. Their filthy condition suggests that they are rarely washed or cleaned, and the favourable soil that their dirt affords for the accumulation and possible development of noxious germs can be imagined. Is there no sanitary authority responsible for the inspection of these carriages? In one case within my knowledge representations have been made, but apparently without
effect.-I am, etc.,
August 13th. OBSERVER'
What is interesting, is that the class of carriage wasn't even mentioned. Indeed, by the late nineteenth century even third class accommodation was of a good standard and, as shown by this letter, the expectation was that in whichever one chose to travel it, it would be at least clean!
 The British Medical Journal, Vol. 2, No. 1807 (Aug. 17, 1895), pp. 451-452