Everyone knows that there is a closed equivalence relation $\sim$ on the Cantor set $C$ such that each non-trivial equivalence class has exactly $2$ points and $[0,1]\simeq C/\sim$. Thus a closed quotient of a zero-dimensional space may not be zero-dimensional, even if the equivalence classes are compact. Note that in this case, if we specify that $C/\sim$ must be totally separated, then $C/\sim$ is automatically zero-dimensional, because every totally separated compact metric space is zero-dimensional. Totally separated means that for every two points $x$ and $y$ in the space, there is a clopen set containing $x$ and missing $y$. Zero-dimensional means that the space has a basis of clopen sets.
This question is about similar quotients of the irrationals $\mathbb P$.
Question. Let $\sim$ be a closed equivalence relation on $\mathbb P$ such that $\mathbb P/\sim$ is Polish and every equivalence class is compact. If $\mathbb P/\sim$ is totally separated, then is $\mathbb P/\sim$ necessarily zero-dimensional?
Note that every Polish space is a closed quotient of $\mathbb P$; shown here. So the condition that the equivalence classes are compact is critical. I believe my question is equivalent to: Is every totally disconnected Polish perfect image of $\mathbb P$ zero-dimensional? A continuous mapping is perfect if it is closed has compact point preimages.