You are correct that the railway (principally Pullman) tradition of tipping sleeper attendants and diner waiters came from this approach, and divided into ethnic groupings, which to a considerable extent prevail to today, with African-American car attendants and waiters, and Filipino lounge car stewards, separated from European operating crews. This was the case nationwide, even in areas of the USA where there were few of these minority groups, it was a tradition. There were separate unions as well, as the mainstream unions would not admit these groups - the Brotherhood of Sleeping Car Porters probably the longest established.
These positions were initially unpaid, and then on a lesser scale. Diner waiters would have small bags round their necks which they placed their tips into. It became an issue in WW2 when these crews were assigned to long distance troop trains, with enlisted soldiers unused to this approach, poorly paid themselves, and bringing their own attitudes. Some railroads, though not all, paid these crews extra when running these trains.
Allied with this, these positions stayed with long distance trains from start to finish, maybe over several days, with accommodation often in an old coach attached to the rear. Operating crews very strictly stayed within their own division and were changed en route; such an approach is still how it is nowadays.