I have been brushing up on the derivation for the Rayleigh-Jeans law for a video I'm making. My question relates to the equipartition theorem. I understand that the application of the equipartition theorem to standing waves inside the cavity (I'm considering the standard hollow box with a hole picture of a blackbody) yields a factor of $k_BT$ ($\frac{1}{2}k_BT$ each from the quadratic degrees of freedom associated with a 1D oscillator).
What I am trying to understand is how this makes sense from the perspective of the oscillating charges in the blackbody walls generating the radiation. For each of the $x$, $y$ and $z$ directions that the charged particles in our blackbody walls can oscillate in, there are associated kinetic and potential terms. The total number of quadratic degrees of freedom in this picture is 6, which should lead to a factor of $3k_BT$.
Does the standing wave assumption preclude 4 of these extra degrees of freedom? Or is there something else I am not accounting for?