When they introduced Cassidy and Butch as antagonists(and far more competent ones at that), I thought that they might replace Jessie and James but that idea set sail the moment Cassidy and Butch got thrown in jail. I will disagree with you though that they chose Team Rocket over Misty. I consider them separate entities with completely separate roles. Its true that Misty is beloved by a lot of fans but clearly she wasn't as crucial to the show's success as May, Dawn and Serena turned out to be decent characters(Iris gets shafted but she wasn't that bad either. Annoying... certainly but not a complete and utter failure for a character. Certainly a failure for the writers due to the potential character she could have been).
Anyways, so far in Sun and Moon, Team Rocket has basically been a nuisance rather than an actual threat and its been that way ever since AG where other Antagonist groups have taken the role of being the main threat(which only exacerbates how bad Team Skull has been so far. Hurry up Aether... you're my only hope!). The only reason I can see Team Rocket still being around is for comedic purposes(Bewear being part of the gag) and as a bridge to previous series/generations.
Actually, a bit of a correction, but they had in fact replaced Misty in favor of Team Rocket. According to Takeshi Shudo's blogs, they had to choose between two characters to give the axe: Misty, or Team Rocket. Since Shudo's favorite characters were Team Rocket, they ended up giving Misty the boot instead. This is official word of god and fact, not even my own speculations.
And as far as Misty, quite frankly, she seemed far more vital to the success of the show than May, Dawn, and Serena (especially considering that with May, they gave her the axe despite Sinnoh having contests and then replaced her with Dawn just to do the exact same goal, and then when DP was up, she got axed as well, and with Serena, they had her axed for pretty much the same reason). Not to mention if it weren't for Misty, Ash would have died on his first day (or, heck, multiple times after that). Besides, speaking as someone who actually saw them in action, May and Dawn anyways, I can't even say they were decent, they were just badly done.
And honestly, they don't even do a good job being actual threats. There are ways to be comic relief yet still threatening. Just look at the Joker, or Kefka, or Bowser, or several of the more comical Disney villains (even Gaston, who I personally consider a very weak Disney villain).