well it all depends on what you call a locomotive. diesel units, at least in the north western hemisphere, can be multipled togather to give any size/power of locomotion reguired. the real limit of course is drawbar failure from putting to much power on one part of too long a train, up and down grades and starting it and so on.
this is the reason for midtrain helpers on grades. when i was growing up on 'the hill' as we called donner summit, ruling grade 2.2%, which may not sound like much in narrow guage or trolly terms, but we're talking about typically 120 to 200 car freight trains, mixed freight, tens of them, often more then 50, sometimes close to a hundred, EVERY DAY, 24-7-365, over donner pass, elevation 7010 feet, from 130 some odd feet elevation approximately in roseville, IN LESS THEN A HUNDRED MILES, then dropping 'down' to 6800 or so elevation in truckee, and then i think somewhere arround 5 or 6 thousand something in reno/sparks.
in steam days it took three big mallet consolodations, 4-8-8-2 cab forwards, one on the point, one 40 cars back from the head end, and a third one 20 cars ahead of the caboose. the helpers were then cut off at norden, within a couple of miles of the actual summit, and sent back down the hill to roseville where all eastbound freight departed out of.
when the went to diesel, four f-units, when they were new, were used to replace each mallet (they weren't componds, the were simple, but they kept calling them mallets because that's what everyone was used to and a simple name to remember to call them). it wasn't long though befor the hill started wearing them down and each 'engine' consisted of five or more f-units, with early gp's and sd's interspersed. over time the f-units got replaced of course with more powerful gp's and sd's and their alco equivelants, and any number of other experiments, ALL MU'd togather.
sp chainged the pinouts of the alco and any other mu connectors to match those of emd and made whatever other electrical chainges was neccessarry, to multiple all of them togather in any all combination, which they did in fact run.
for a while the sd45 was the standard, with three or four of them to an engine, then they, in cooperation with emd developed the t-2's, which stood for tunnel unit, dash two series. which like the steam mallets with their cab in front, were specific adoptations to 80 miles of a mix of snow sheds and tunnels, streatching most of the way from blue canion, over the summit, to almost into truckee.
so while i don't think we can boast of neccessarily the longest or heaviest SINGLE TRAIN, typically massive tonnage was moved, ON A ROUTINE BASIS over a gradient signifigantly steep for a class one line, using lots and lots of power, in often odd and interesting combinations.
(i might add, that while ownership of the line has chainged hands, and individual diesel units have gotten massively even more powerful, this, other then the cutting off of hepers at norden, continues to this day. the helpers now, instead of cutting off, just run on through to the old devision point at sparks, that or they run slightly shorter trains without them. but i see them heading out up the hill everyday just a few blocks from my house where i live in roseville now.)
=^^=
.../\...