the process only becomes reversible once the two planets are at equal temperatures
Assuming we have radiant heat as the only means of converting energy, then everything stops when the planets are at equal temperatures. We are then at max entropy and nothing else can happen.

But this example is intentionally over simplistic to show how the First and Second Laws work. The mass of the planets have an energy equivalent, and further energy conversions would be possible, which would lead to further increases in entropy.