EDIT: I tried to improve the presentation. I hope that it is a bit more readable now.

I think that the following construction gives a consistent counter-example. It uses the combinatorial principle $\diamondsuit$, which implies CH (the continuum hypothesis) and is independant from ZFC.

I'll work with ordinals, and since $\alpha<\omega_1$ (for instance) may be seen either as a point or as a an initial segment in $ \omega_1 $, I'll use the interval notation when I refer to the latter.

Start with a circle bundle over $\omega_1$, that is, a space $X$ with a continous map $\pi$ onto $\omega_1$, such that the fiber over each point $\pi^{-1}(\{\alpha\})$ is a circle. (Of course, $\omega_1$ is endowed with the order topology.) Say that a subset of $X$ is bounded if it is contained in $\pi^{-1}([0,\alpha])$ for some $\alpha<\omega_1$, and unbounded otherwise.

Nyikos showed in his article "The theory of non-metrizable manifolds" in the Handbook of set theoretic topology (Example 6.17) that using $\diamondsuit$, we can construct a circle bundle over $\omega_1$ with the following properties:

1) The underlying set of $X$ is $\omega_1\times\mathbb{S}^1$, but the topology is not the product topology.

2) $\pi^{-1}([0,\alpha])$ is homeomorphic to $[0,\alpha]\times\mathbb{S}^1$ with the usual product topology for any $\alpha<\omega_1$. In particular, $X$ is locally compact. We may fix an homeomorphism $\psi_\alpha:\pi^{-1}([0,\alpha])\to [0,\alpha]\times\mathbb{S}^1$ for each $\alpha<\omega_1$.

3) If $E\subset X$ is closed, then either $E$ is bounded, or $E$ contains $\pi^{-1}(C)$ for $C$ a closed and unbounded subset of $\omega_1$. In particular, in the latter case $E$ is not totally disconnected since it contains copies all the fibers (which are circles) above the member of $C$.

(Note: Actually, Nyikos builds a bundle over the long ray ${\mathbb{L}}_+$ which is even a surface, but we take only the restriction to $\omega_1$.)

Now, define a circle bundle $\pi':Y\to\omega_{\omega_1}$ as follows. The underlying set of $Y$ is $\omega_{\omega_1}\times\mathbb{S}^1$. $X$ will be included in $Y$ as the union of the fibers above the $\omega_\alpha$, for $\alpha<\omega_1$.
The topology "between" $\omega_\alpha$ and $\omega_{\alpha+1}$ is the usual product topology. That is, if $\omega_\alpha < \gamma < \omega_{\alpha+1}$, given $x\in\mathbb{S}^1$, take $\beta,\beta'$ with $\omega_\alpha\le\beta<\gamma<\beta'< \omega_{\alpha+1}$ and an open $O\subset\mathbb{S}^1$ containing $x$, then $(\beta,\beta')\times O$ is a neighborhood of $\langle\gamma,x\rangle$.

We now define the neighborhoods of $\langle\omega_{\alpha},x\rangle$.
In $X$, choose a neighborhood $U$ of $\langle \alpha,x\rangle$, and denote by $U^\beta$ the intersection $U\cap \pi^{-1}(\{\beta\})$. Set $V^{\omega_\beta}=U^\beta$, and
if $\omega_\beta<\gamma<\omega_{\beta+1}$, set $V^{\gamma}=U^{\beta+1}$. That is: $V^\gamma$ is equal to the intersection of $U$ with the fiber over $\beta+1$. Then a neighborhood of $\langle\omega_{\alpha},x\rangle$ is given by the union of $\{\gamma\}\times V^{\gamma}$ for all $\gamma$ greater than some $\gamma'$.

Then $Y$ has the following properties:

2') For any $\alpha<\omega_{\omega_1}$, $(\pi')^{-1}([0,\alpha])$ is homeomorphic to $[0,\alpha]\times\mathbb{S}^1$ with the usual product topology (and thus $Y$ is locally compact). To see this, define the homeomorphism $\phi:(\pi')^{-1}([0,\alpha])\to [0,\alpha]\times\mathbb{S}^1$ by setting $\phi(\langle\omega_{\alpha},x\rangle)=\psi(\langle\alpha,x\rangle)$, and for $\omega_\alpha<\gamma<\omega_{\alpha+1}$, set $\phi(\langle\gamma,x\rangle)=\psi(\langle\alpha+1,x\rangle)$, where $\psi$ is defined in 2) above.

3') As 3) with $\omega_{\omega_1}$ rather than $\omega_1$.

Now, a bounded subset of $Y$ is contained in some $[0,\alpha]\times\mathbb{S}^1$, and has thus cardinality $\max\{|\alpha|,\omega_1\}<\omega_{\omega_1}$ (since $2^\omega=\omega_1$ by CH). Taking the one-point compactification yields a compact space such that a closed set of cardinality $\omega_{\omega_1}$ cannot be totally disconnected.

I hope that I did not miss something.

I don't know whether another construction can be done in ZFC, but this particular one needs at least something more than ZFC+CH, because Nyikos space $X$ would have to contain a copy of $\omega_1$ (which is impossible, and thus the space does not exist) in a model of ZFC+CH due to Eisworth and Nyikos.