Ideally all hand tools including shavers should be Class 2. ROSPA stats indicate that the rate of accidents with Class 2 appliances is far lower than with Class1. The problem with earths in flexes is that they can come detached and contact the live terminal, which creates a worst-case level of hazard.
We had a case like this at the airfield I used to fly from, where someone got a nasty belt whilst working outdoors with an extension lead. Turned out that the supply cable had been pinched at the metal wall socket, and the live shorted to the (severed) earth connection, making both the socket case and any metal hand tool case live. We'd known about the wiring problems for a long time (and nagged the bosses over it a few times) but management was reluctant to spend money on a remedy. I put in a full report on my findings, and thankfully that death trap was rewired as a result.
I think we got lucky on that one, they guy was working outdoors in wet conditions and it could easily have been a fatal.
I also have a dislike of metal wall sockets. Another unnecessary piece of metal to earth. The less, the better.