Magic Erasers (melamine foam) work by acting as a fine abrasive, or high grit sandpaper, so they not only remove whatever surface stain is present, but also part of the substrate it rests on.
Not necessarily the best way to attack the surfaces of electronic devices, like touchpads.
If those stains do come from greasy hands, a surfactant that will lift and separate the grease from the surface is the safer and preferred approach. Most households will have such a handy thing in the kitchen -- dish soap, whose purpose happens to be to strip greasy substances from porcelain, metal, glass, and plastic, and rinse easily and cleanly.
The laundry room will have a stronger version -- liquid detergent, but it's harder to to rinse cleanly, but worth a try if the dish soap doesn't work.
There are also dedicated degreasers, but they can be strong enough to damage surfaces, so are best avoided. Goo Gone, and Goof Off also fall into that category, with the latter being the strongest, and to be avoided surfaces such as this.