Polymer and elastomer friction in the thermal control regime