I don't think it was completely thought through by the Dems. I think they look at it as a chance to sow discord and weaken the GOP. They may also think that the next leader may be less competent. Which could be true. Or the next leader will be unsteady, because of McCarthy's fate.
McCarthy was bad, and it's good he is removed, but it could end up worse from conservatives. We don't know what the end fallout will be.