Your assumptions about a longer barrel taking more heat than a shorter barrel are semi-science, CLOSE, but ignoring a much heavier contribution to the barrel heat.
The chamber area of a 14.5" and a 20" barrel will take just as much heat as the other - the extra 5.5" at the end only sees a small relative percentage of the actual combustion, and at a much lower flame temperature, because of the lower pressure at that section of the bore. HOWEVER, that extra 5.5" of barrel does act as a relatively massive heat sink... The longer barrel will heat up slower, and cool down faster.
The transfer of heat from metal to air is much more difficult than from metal to metal. That should answer your questions for yourself.
Thin rails hold heat on the barrel more than fat rails. Fat tubes allow sufficiently greater air mass flow. The thermal transfer to the rail is really undesireable, you're talking about going steel to air, then air to aluminum (or carbon) - this is a wasteful path - it is much better to transfer to the air, then move the air away, as the transfer between air and metal isn't as efficient as metal to metal (heat sink), and the mass of air in our proximate environment is MUCH greater than the mass of the handguard, meaning the relative gross heat capacity (not specific heat capacity, but rather total capacity for storing heat) of the air is much, much greater than the small mass of aluminum, so if you've done the hard work of transferring to air, just remove the hot air, aka, airflow...
If the air isn't moving under the rail, then the rail has to act as an air to air exchanger, which is REALLY inefficient since heat has to transfer from combustion gas to the barrel steel, then back to air, then to the rail, then back to air OUTSIDE the rail... Two extra transfers between air and steel. Air under the rail does have a disadvantage of wanting to stagnate - because it's heating up, it's expanding, so even if you have hot air "pumping" out of the ports, you may not get any cooling air flowing INTO the rail... A net outflow of hot air doesn't necessarily mean heat is being efficiently drawn away from the barrel - cool air has to be moving INTO the rail too.
Longer, fatter barrels stay cooler longer than smaller diameter, shorter barrels. The maximum pressure and temperature are happening within a couple inches of the chamber, so naturally, the greatest heat load is happening here. The transfer of heat down the length of the barrel is MUCH faster than the transfer from metal to air, as mentioned above, so effectively, the length of the barrel acts as a heat sink for the chamber area. Similarly, the extra diameter of the barrel acts as a heat sink to draw heat away from the bore - THEN when it's drawn to the surface, where the BTU's are forced to make the jump to a new media (air), the larger the diameter barrel will have more surface area through which to eject that heat. With the peak temperature happening near the chamber, and of course, happening IN the bore, the more direct contact metal available to pull heat radially and then axially away from that area, the cooler the barrel will run.