The points about the fuel are a big issue - on some challenging climbs, a locomotive could often not even get to the top with any fuel left, and had to refuel half way up the grade. One climb like that was Raton Pass in southern Colorado.
My uncle "drove," as he always referred to it, locomotives for the Santa Fe Railroad. by the time I was born he had enough seniority that all he did was drive helper locos back and forth over Raton Pass between Trinidad, Co, and Raton, NM. (Operating helper locos was preferable and always taken by the most senior engineers because it meant you would be home most nights, not out of in California or Chicago with a long-distance train.). I made the trip with him twice when I was very young, once in the cab of a steamer, I think a 2900 class Northern, and later in the lead F3 of the Super Chief. The roughly 20 miles between the two stations involved about 28-26 miles of track and had an interim station about halfway up the Trinidad to peak side for refueling. It had been built around the time of WWI and was used all the time then. By the 1950s it was often not needed, but some of the old Mallets still used for their extreme pulling power, and not the most efficient locos ever made, needed to stop and refuel there, even then.
A heavy train pulled normally by, say, a big 2900 Northern, and assisted up to the top by two Mallets or similar, would often take half a day to make the trip of around 26 miles by track (about 20 miles between train station). The smoke from multiple engine working at full capacity was incredible - and probably not healthy, although my uncle living into his eighties and never had any lung-related problems.
Unusually for many RRs, on Raton pass the helper locos did not turn around at the top and head back, but continued downhill into Raton, where they were refueled again, and serviced if needed (often they did need it, it was only a few miles by all at max stress!), and when serviced and refueled, they helped trains coming the other direction, from Raton to Trinidad, climb over the pass.