Text this: The Tolman–Ehrenfest criterion of thermal equilibrium in scalar–tensor gravity