  We consider a family of $*$-commuting local homeomorphisms on a compact
space, and build a compactly aligned product system of Hilbert bimodules (in
the sense of Fowler). This product system has a Nica-Toeplitz algebra and a
Cuntz-Pimsner algebra. Both algebras carry a gauge action of a
higher-dimensional torus, and there are many possible dynamics obtained by
composing with different embeddings of the real line in this torus. We study
the KMS states of these dynamics. For large inverse temperatures, we describe
the simplex of KMS states on the Nica-Toeplitz algebra. To study KMS states for
smaller inverse temperature, we consider a preferred dynamics for which there
is a single critical inverse temperature. We find a KMS state on the
Nica-Toeplitz algebra at this critical inverse temperature which factors
through the Cuntz-Pimsner algebra. We then illustrate our results by
considering backward shifts on the infinite-path spaces of a class of
$k$-graphs.
