Too much confusion in this thread...
You don't say torque is better for this and horsepower is better for that.
ALL engines develop torque.
ALL engines develop horsepower.
Torque is the twisting force that the crankshaft is actually exerting at any RPM.
Horsepower has to do with how fast the torque is being put out.
It is horsepower that determines how much work an engine is going to be capable of doing, and so that's why engines are rated by peak horsepower output. Because horsepower has the factors of torque and speed, you can increase one and decrease the other. Thus, an engine that makes 300 horsepower at 5,000 RPM has exactly the same torque output as an engine that makes 300 horsepower at 1,000 RPM, after both undergo the necessary gear reduction to acheive the same shaft speed, and if you neglect friction losses from this process.
That's a big IF there. The fact is, drivetrain losses do occur, and the more gear reduction you have the worse it is. That is why the aforesaid Benz can hang with a Ferrari that outpowers it, because at the rear wheels the Benz has the advantage in horsepower losses.
It is always better for an engine to make its power at a low speed, for a few reasons that I won't get into at this point. The reason you see so many people revving their engines sky high to make horsepower is because you don't need to make lots of torque when you can use gear reduction as a crutch. An ideal engine will have high torque production so they don't need to be spun too fast.