I think it was actually pulled off well in Pokemon Rangers: Guardian Signs. Throughout the game you're facing against the Pokemon Pinchers, a team who used to be smaller groups of thieves who lately formed together and started using technology that can control Pokemon (they also have what are essentially flying scooters). They're a threat but you're able to handle them and many of the grunts are as incompetent or silly as ones from main series teams. For a while things to be going as you'd expect, you travel around Oblivia stopping the Pinchers and meeting friendly NPCs along the way.
However things get serious when you meet the head admin of the Pinchers, Purple Eyes. His introduction was him violently attacking the senior Ranger in the region (he had an artifact that the Pinchers were stealing to awaken the Winged Mirages) but after defeating him you then meet the REAL leaders behind the Pinchers. Some of the NPCs you met while traveling around Oblivia was a four elderly people: Doctor Edward (a physician who you meet making a house call), Kasa (I think she was a fashion designer or something, I don't remember much about her), Arley (an lumberjack who in one mission you heard went to "stop" the Pinchers but never came back so you go and find him), and Hocus (a magician who entertains the kids of Oblivia). They're all kind and sometimes provide assistance with your mission... but it's all a masquerade. It's revealed that the four were actually a former group of expert Pokemon thieves known as "The Sociatea". Originally, after becoming too old to keep thieving, they did retire to the peaceful lives you saw them living and were happy... but they grew nostalgic for their younger days and they were reaching the end of their life. They heard about the legends of Oblivia, including steel armor that controlled Pokemon and a golden armor that made you immortal, so they formed "The Sociatea" again and united the Pinchers to get them the Golden Armor and using technology developed from the steel armor to control Pokemon so they could take over the world. It really gets dark as the The Societea then summons the Sky Fortress, an ancient floating fortress equipped with a cannon that they used to DESTROY AN ISLAND (the island was only inhabited by Pokemon, however it was not only the first island you started your journey in Oblivia on but was also the home island or your Pokemon partner, Pichu. And Pokemon were still living on it, though its a kids game so they were able to get off it in time thanks to a friendly boatmaker/carpenter having made boats for the Pokemon to use if they ever wanted to go to the other islands).
It was rather a surprising twist and I felt done well. You didn't expect it and their motivation felt believable (they didn't want to die and missed their youth, if anything taking over the world was a secondary goal and only did it because, eh, why not?). Course the game adds a second twist where Purple Eyes comes back (Purple Eyes has a sort of superiority complex and, before the rising of the Sky Fortress, Edward told him he was just a pawn that couldn't even do his job), steals the golden armor pieces (each member only wore one piece of the golden armor), and takes control of the Sky Fortress's Mewtwo (yeah, the Sky Fortress had a Mewtwo in it) and uses it to make the members of the Societea vanish (though after defeating it and bringing down the Sky Fortress the were all found floating in the middle of the sea and picked up (and arrested) by the Ranger Union). But still it was all done better and, more importantly, subtlety than XY because if you didn't think Lysandre was the leader of Team Flare after one look at him & your first meeting has him rambled about being better than everyone else than you should take that blindfold off (how are you even reading this?).