Dynamics and thermal stability of surface-confined metal–organic chains