Filling a hot Kettle
Shock cooling anything is never good, strictly speaking, but whether there is serious harm in practice will depend on many factors. Refilling a hot kettle with cold water immediately after emptying probably will not make that much of a difference to the longevity of it. 

If you are excessively cautious and a bit pedantic, I would say completely emptying a hot kettle will create more problems, such as increase of scaling especially if you have hard water and iron piping or corrosion. There is far more shock cooling from the last few drops of hot water evaporating off the element. I would not worry too much about refilling straight after. If you really do care, it would be more beneficial to not drain it of hot water to the point of exposing the element out of water.