Let G G be a reductive group over a non-archimedean local field F F of residue characteristic p p . We prove that the Hecke algebras of G ( F ) G(F) , with coefficients in any noetherian Z ℓ \mathbb {Z}_{\ell } -algebra R R with ℓ ≠ p \ell \neq p , are finitely generated modules over their centers, and that these centers are finitely generated R R -algebras. Following Bernstein’s original strategy, we then deduce that “second adjointness” holds for smooth representations of G ( F ) G(F) with coefficients in any Z [ 1 p ] \mathbb {Z}[\frac {1}{p}] -algebra. These results had been conjectured for a long time. The crucial new tool that unlocks the problem is the Fargues-Scholze morphism between a certain “excursion algebra” defined on the Langlands parameters side and the Bernstein center of G ( F ) G(F) . Using this bridge, our main results are representation theoretic counterparts of the finiteness of certain morphisms between coarse moduli spaces of local Langlands parameters that we also prove here, which may be of independent interest.