The Ivorian was sent-off for an idiotic headbutt in last weekend's draw with Leeds United.
But Mikel Arteta stuck by the winger, and his faith was repaid when Pepe curled a powerful strike into the top corner early in the second-half.
Reiss Nelson doubled the advantage with a close range tap-in shortly after.
Teenager Folarin Balogun scored with his first touch to seal the victory.
Arsenal have now qualified for the knockout rounds with two games to spare.