to be fair, toxic spikes was the only real thing that could do much. I guess spikes would also kill him? Not sure about the switch in rocks though. They might also one shot him.
Lucario is the MVP once it realized how dire things get… But Magmortar setting up Toxic Spikes really helps in the long run. Without it, Shedinja will cause troubles.