The thing about Wonder Guard is that it has the potential to be super OP in the right circumstances. Game Freak knows this, and has made a number of deliberate decisions to discourage or prevent this from occurring. For example, if you were to get it onto an Eelectross holding a Balloon, it would have 100% immunity from attacks. Wonder Guard would prevent anything but Ground (the only weakness of Electric) from hitting, but the Balloon would prevent Ground from ever hitting (not touching the ground). Since the prevented attacks never connect, the Balloon can never be popped. In that scenario, there's no direct attack, and very few indirect attacks, that can deal with that Eelectross.
Because of this, Wonder Guard cannot be swapped or copied by Abilities such as Power of Alchemy, or attacks such as Role Play. You can spread it with Entrainment, but that requires some setup to do and is extremely difficult to pull off anywhere but Doubles or Triples.