Yes, an electric mouse killer can harm a guinea pig.
These devices deliver a fatal electric shock designed for mice, but guinea pigs are smaller and more vulnerable to electric shock. Their curiosity may lead them to investigate the device, and they can access small spaces where a mouse killer might be placed.
Safer alternatives: Humane traps, poison bait used cautiously and kept out of reach, or professional pest control services.
If you have guinea pigs, it is best to avoid using electric mouse killers altogether. Any rodent control method should be used cautiously to minimize risk to pets and other animals.