I travel with my favorite electric shaver all the time. I love it, but it has one significant design flaw: There is a plastic cover over the foils that also covers the on/off switch. The cover slides off very easily, and the on off switch is pressure activated.
You can imagine that when stuffed into my luggage the cover comes off frequently and the shaver eventually gets turned on as the luggage is moved about. Happened to me on a trip last week and has happened dozens of times over the past few years. Sometimes I pull my rollaboard out of the overhead and the bag is "humming".
I guess I'm glad the OP hasn't been on any of my flights!