"I've always just thought a steel barrel could heat up and cool down and it wouldn't hurt anything..."
It depends on the temperatures involved.
Heat treating 101 (for steel): you heat it up really hot, like 1500 degF - that's glowing red, then quench it. Then you temper by reheating to some lower temp. That lower temp varies by alloy and desired hardness. Plain carbon steel that you want to be really hard (a knife blade, for example) might get tempered at 350 degF. Heating and cooling it to any temp below that won't affect it, while heating it above that temp will soften it permanently. If you've ever sharpened a knife on a bench grinder an turned it blue, that blue oxide forms at 700ish degrees; the knife won't hold an edge after that.
You'd have to test them to be sure, but I'd wager most gun barrels are tempered to more than 500 degrees (because they'd be too hard to rifle if tempered to lower temps). It could be much higher than that for some stainless steels. Chrome moly like 4140 is probably tempered to 800 or above (those alloys are brittle if tempered in the 300 to 700 range).
In any event, temps lower than 350 degF aren't going to permanently soften the steel. That's past 'too hot to hold comfortably' and into 'you just got burned' - think taking something out of the oven w/o an oven mitt.
Having said that, will a rifle barrel's throat erode faster if it's run at 300 degrees than at 100? I dunno. IIUC, the exact mechanism of throat erosion isn't know - maybe mechanical wear, maybe some chemical wear, etc. The chemical reaction angle might matter; reactions can go a lot faster at higher temps.
But as far as the bulk hardness of steel, under 350 won't affect it. If you have a full auto that's glowing red, yes, that barrel should be discarded. Merely 'uncomfortable to touch, like a fender in the sun, shouldn't affect anything.