Stability of thermal equilibrium in long-range quantum systems