CGEL by Huddleston & Pullum (Page 1537) has this example
(d) So as head of clause with dependent modifiers or complements
 ii The Coo-ee cordial factory prospered almost at once, so much so that my father bought a new house at Coorparoo.
And at the bottom of the next page, CGEL calls so in  a pro-form as follows:
In  so is the head of a clause; clauses normally have a verb as head, but so lacks the important inflectional properties of verbs. Overall, then, we prefer to classify anaphoric so simply as a pro-form; its properties are unquestionably unique, and we do not believe that anything is gained by forcing it into one or more of our general part-of-speech categories.
Now, two pages later, CGEL has this example:
 iii There had been a power failure, so that all classes had had to be cancelled.
In [72iii] so is a preposition functioning as head of a result adjunct.
I wonder how and why you should distinguish the two so’s as in CGEL. If so in the first example is a pro-form, shouldn’t so in the second example be a pro-form, as opposed to a preposition?
 The Coo-ee cordial factory prospered almost at once, so much so that my father bought a new house at Coorparoo.
In the sentence above the word so is taking the place of a clause. If we reinsert the clause in place of so, it will read:
The Coo-ee cordial factory prospered almost at once, so much did the Coo-ee cordial factory prosper that my father bought a new house at Coorparoo.
[Notice here that the clause following that is not related to the so that we replaced. It is a dependent of the initial degree adverb so at the very beginning of the clause. The sentence is similar in structure to:
- So fast did it go that we could not catch it.]
There had been a power failure, so that all classes had had to be cancelled.
Here the word so does not represent a clause. In fact it is appearing between two clauses:
- [There had been a power failure] so [that all classes had had to be cancelled.]
The word so here belongs with the second subordinate clause, of which it is the head. This so is different from the one in (64). In (64), the pro-clause so was not related to the clause following it. We showed that, in fact, the clause following so in that construction is actually a dependent of the earlier degree adverb so. However here, in example (74), the following clause is directly related to the word so. This is because the word so tells us that the classes being cancelled is a result of what was described in the main clause.
The so in (74), therefore, is a very different beast from the one in (64). Nonetheless, it still has some similarities. Apart from sounding the same, both have an anaphoric relationship with what has been said before. However, in (74), the word so is not a pronoun, pro-verb, or pro-clause. It is merely a resultative preposition.