I have often used shaver sockets in train toilets in the past. It was especially useful when travelling early in the morning, as it meant you could have a few more minutes in bed (or leave home earlier to give yourself more time to catch your train), as you say.
I rather suspect that train operators are now getting rid of them because they found that not many people were using them, so it is not worth the cost of maintaining them, or that people were misusing them (for example, by plugging higher wattage appliances such as hairdryers into them).
Or I suppose they might have had complaints from passengers about people occupying a toilet for 5-10 minutes to have a shave. With more people travelling by train now than in the 1970s or '80s, space is at a premium, so they feel that they need to have more seats and fewer toilets (hence only one toilet per coach in the refurbished Mark 4s instead of two when built), and there will be more pressure on the remaining toilets.
I suppose battery or rechargeable shavers may also have reduced the demand for shaver sockets on trains. I now also have a battery shaver, and have recently bought one that you recharge by plugging it into a USB socket on a computer, as I can't rely on there to be shaver sockets everywhere I go.