So is used as an adverb and doesn't refer to the subject of the sentence. It usually refers back to something mentioned before. It is not a placeholder as it has the following meanings defined in Oxford Online Dictionary.
(1) That is the case: ‘Has somebody called an ambulance?’ ‘I believe so’
(2) The truth: I hear that you’re a writer—is that so?
(3) Similarly; and also: times have changed and so have I
(4) Expressing agreement: ‘There’s another one.’ ‘So there is.’
Example sentences above meansmean:
(1) I believe somebody called an ambulance.
(2) Is that true that you're a writer?
(3) I have also changed as times have changed.
(4) Yes, there is another one.
As you can see, the adverb so functions mainly to avoid repetition of a word or words that were previously mentioned.
Your example sentence will be
The moon rotates itself but it (the moon) rotates itself very slowly.