I saw an article in a Family Handyman magazine about how to store an electronic toothbrush on a wall using a strip of metal and a magnet. The article mentioned connecting a strip of metal to a wall, then using a neodymium magnet to attach to the metal. The toothbrush simply clings to the magnet because it has metal in it.
I happen to have a bunch of neodymium magnets from computer hard drives in my stash of junk. Those magnets are very strong and are attached to pieces of metal that have built-in mounting holes. I attached one of those magnets to the wall in my bathroom using drywall screws.
One added benefit is that the magnet appears to charge the battery in the toothbrush.