I can't prove that Porygon2 is the best possible teammate, but I think it's good. Porygon2 can use ice beam to cover flying and build ice bridges and shadow ball to cover ghost, both of which often wall Gallade. Gallade checks some of the fighting opponents that can break Porygon2 and steel opponents that are immune to toxic.
A Pokemon that you should seriously consider using over Gallade is Metagross. (I made sure it was obtainable in Moon) Metagross has a much better ability and defensive typing, as well as better physical defense. It learns psychic and fighting attacks like Gallade does, but it can additionally learn meteor mash to cover fairy.