Reference proof for Second-Order Logic captures Polynomial-Time Hierarchy
It's one of those proofs that's essentially obvious once you can prove Fagin's theorem that the existential fragment of SO is exactly NP. Alternating quantifiers in the SO formula takes you up the polynomial hierarchy more or less by definition.

Proposition 7.35 of Libkin's Elements of Finite Model Theory proves that MSO expresses complete problems at every level of PH. Corollary&nbsp;9.9 of the same book is that SO=PH; but the proof consists of a sketch with an exercise to fill in one of the steps.  The proof that SO=PH is also essentially Exercise&nbsp;7.5.18 of Ebbinghaus and Flum's Finite Model Theory (2nd ed.). Immerman's Descriptive Complexity states the equivalence as Theorem&nbsp;7.21 and Corollary&nbsp;7.22 but leaves the proof as an exercise and credits the result to Stockmeyer's paper.

Given all of that, I doubt you'll find a proof in print. The details probably are fiddly but your outline sounds correct.