The generalized equipartition theorem is derived in Section 6.4 of the famous Huang's Statistical Mechanics book (1987, 2nd edition).
In order to prove the "generalized equipartition theorem", Huang uses the microcanonical ensemble, which is the "standard" choice for systems that can be regarded as isolated (in the sense that the energy is a constant of the motion). This "standard" choice of the microcanonical is somehow justified if we believe that the system is ergodic, or if we assume the ergodic hypothesis. In other words, to prove equipartition, ergodicity may only be needed as a very first step to justify the use of the microcanonical ensemble in the first place, see e.g. this, this and this answers. Is ergodicity necessary?
Let me stress that Huang does not invoke the ergodic theorem to justify the microcanonical ensemble, even though it seems to be the justification we need: this is discussed in Section 4.5 of the same book. In fact, another way to look at the microcanonical ensemble is the principle of indifference, as proposed by Jaynes in "Information and Statistical Mechanics", see also this and this answers. Jaynes' argument provides a justification for the use of the microcanonical ensemble (not its "realism") that is alternative (or complementary) to the ergodic hypothesis.
In other words: if our isolated system is ergodic, then the microcanonical ensemble can (in principle) be realized, see e.g. the historical review by Gallavotti. If we are not sure about the ergodicity of the system, we can still use the microcanonical ensemble via Jaynes' argument, even though it may not be physically realized. There seems to be no other connection between the equipartition theorem and ergodicity other than this, quite indirect, link. I may be wrong, but it seems to me that there is the same (indirect) connection between "ergodicity" and any possible result pertaining to the equilibrium state, see e.g. this answer.