(Copy-paste of a post I made in a different thread pertaining to an idea I had on what they could do with Team Rocket post-E4.)
Here's an idea I had for the plot TR-wise:
Everything remains pretty much the same with them up to Goldenrod, the only difference being that the Executives have names and personalities. For the sake of simplicity, I'll call the main Exec that you fight in Goldenrod at the end Hector, the female Exec Irene, and the other two Execs will be Jasper and Ken. So you battle with them all at their secret base at the Lake of Rage, and Hector does the whole "Come back, Giovanni, we can't do anything without you!" thing, and then you stop him and most of Team Rocket gets captured. However, Jasper, who throughout the game speaks of Hector as a weakling who can't do anything himself, takes control of the organization, perhaps taking Irene and Ken with him (although only one of them is really necessary, or a new one). He sets up shop in a secret base whose location is a secret passage in Cerulean Cave. When the player makes his way to Cerulean City, the player will somehow discover that Cerulean Cave was sealed up after the events of FR/LG, but is now unsealed by unknown means (or, alternately, it was never sealed, but there have been bizarre tremors in the city lately whose source is said to be the cave). Going through the cave to where Mewtwo once was will reveal that Team Rocket is digging for... something. You beat the Grunts operating the machine, and they run off, dropping a strange picture of something, which turns out to be the location of the secret switch that opens up to the passageway in the cave that leads to the elevator that goes up to the new Rocket Base. Going through the base, there are several computers that reveal that beneath what is the bottom floor of Cerulean Cave is actually another level, a large cavern where a powerful pokemon is said to dwell (the version-exclusive Hoenn legendary). You make it through the base, battling Grunts until you finally make it to Jasper, who you defeat, but who escapes out a secret back exit that is locked with something called the 'Executive Key'...
After this, you can go down into the Cave and battle/capture Groudon or Kyogre, then head off through Kanto some more. When you make your way to Celadon City, the former Team Rocket base beneath the Game Corner has been turned into an exclusive shopping center. However, if you manage to find something (I'm not totally sure how you'd access this yet), you can access a secret B5 floor, which is, you guessed it, a Team Rocket base! Ken's the boss of this place, hiding out here until Team Rocket's reemergence, and when he's beaten, you gain the Executive Key. Now, if you go back to the Cerulean Rocket Base and use the Executive Key on the secret exit that Jasper escaped through, you'll find yourself outside on top of the mountain that the cave was in. After a short hike, you'll find a Team Rocket Laboratory, and after making your way through there, you'll find Jasper (and possibly a Rocket Scientist) standing in front of a tank that holds... Mewtwo! They've began making another one, and Jasper plans on capturing it once it's completed and using it to conquer Kanto and Johto! But you're not about to let this jackass do whatever he wants, right? Hell no! So you battle him, and when you win, Giovanni shows up and convinces him to turn himself in, or a member of the International Police arrests him... or Giovanni, being the founder of the IP, arrests him... (Alternatively, if the Rocket Scientist is there, they could double-battle against you and Giovanni, who shows up for this battle.) Either way, you're getting a Master Ball from Jasper out of the deal, and Giovanni tells you that you can try to capture Mewtwo whenever you want (he lets you take it since he believes that you would be a better trainer for it than he would be, given his past evils and your good heart); he'll keep it in stasis in the pod and guard it from everyone else until you're ready to capture it.
And thus, Team Rocket ends... Unless you didn't get to Rayquaza already. Since TR was doing research on the Cerulean Cave pokemon, it should've been obvious that they had a bigger goal in mind, and what bigger goal is there than Rayquaza? So they show up to fight you for it, and when you beat them, they leave. This group could be headed by Irene, I guess, since it could happen either before or after Jasper's defeat.