Molecular dynamics of shock waves in one-dimensional chains. II. Thermalization