Almost all Pokemon can learn at least one status move that doesn't deal damage (like protect). The only Pokemon that can't do this are Unown and Beldum. However, both can be made to be low-leveled so their attacks deal very little damage. Such a status move (as well as Unown's hidden power and Beldum's take down) are limited to at most 40 PP. For the one Pokemon that can KO all of them, it only needs to hold a leftovers (to heal damage from hidden power and take down) and know moves that total more than 40 PP. This way, the Pokemon that is to be KO'd is guaranteed to run out of PP first and beat itself to death with struggle. (in the case of Shedinja being the one Pokemon, it only needs to use swords dance and a powerful attack, and it'll defeat the opponent before the opponent starts to use struggle) The only Pokemon that can't learn moves that total more than 40 PP (and thus can't KO all Pokemon) are Ditto, Unown, and Beldum.
There were a lot of sources, so I'm too lazy to list all of them. However, I can source specific facts on request.