What does the 'which' in 'after which refers to?
It means "everything we described in the part of the sentence preceding the word after."
As in:
At one time the surface broke apart as a result of repeated impacts, after which [i.e. after the surface broke apart as a result of repeated impacts] the fragments rejoined through mutual gravitational attraction.