This is exactly what he did. He apparently organized the ouster of George Santos, and also was interested in ejecting Matt Gaetz if he was able to before he (Kevin McCarthy) resigned. His intention is to leave the GOP fucked by having only the slimmest of majorities while punishing the people who worked against him.
If there is a single moment where the Democrats can have the majority, before the Republicans are replaced, then they will have the opportunity to do some worthwhile actions. There is also one other Republican who is expected to leave to take a job at a college.
Thanks to the new rules from the Gaetz wing though, the Democrats can rather easily remove and replace the speaker. And they just might if they end up with a majority.
There was a point, around the time the Tea Party astroturfing was in full force, where Republican planning and messaging was unified and tight. Trump showed up and didn't know why things worked the way they did, and Republicans eating themselves is the result.
Surely it can't be that difficult to goad McCarthy into continuing his vendetta after he leaves office. He's no friend to Democrats, but he doesn't have to be our friend to decide that he doesn't care if we win, so long as Gaetz and company lose.
And him leaving means less money. Guy was an ahole of the highest order but he knew exactly how to get rich Republicans to give out their money. I highly doubt he passes that on and no one currently is in a position to replace him in terms of fund raising.