This is (should be) a very basic question in differential geometry/analysis, but I'm not quite sure. Everybody knows Fubini-Tonelli theorem, where if you integrate over a domain $\Omega$ in, say, $\mathbb{R}^3$, you can actually integrate on the slices, or integrate line by line etc (this is actually Fubini or Tonelli theorem, I don't remember which is which, one of the two involves exchanging the order of integration, but whatever). So if you take, say, a cube $[0,1]^3$ in $\mathbb{R}^3$ you get
$$ \int_{[0,1]^3} f(x,y,z) dxdydz = \int_{[0,1]} \left( \int_{[0,1]^2} f(x,y,z) dx dy\right) dz= \int_{[0,1]^2} \left(\int_{[0,1]} f(x,y,z) dx\right)dy dz = \dots ,$$
for an appropriate $f$. Of course this generalizes to $n$ dimensions without a problem. Now, a big leap forward and one sees coarea formula, where given a Lipshitz function $f$ and a measurable function $g$ one has
$$ \int_{E} g |\nabla f| = \int_{\mathbb{R} } \left(\int_{E \cap f^{-1} (t)} g \right) dt,$$
where the inner integral is with respect to an appropriate Hausdorff measure, over rectifiable sets which are the level sets of $f$ in $E$. Now, if I have a domain $\Omega$ which is foliated by some collection of submanifolds, which are not necessarily the level sets of some function, what is the correct formula? I suspect there is a way to view this as a particualr case of coarea with $|\nabla f|=1$, because my feeling is that if you have a domain $(x,y) \in \Omega \subset \mathbb{R}^n \times \mathbb{R}^m$ and
$$\Omega = \cup _{x \in \Omega' } M_x $$
with $M_x$ disjoint $m$-manifolds, I suspect
$$\int_{\Omega} f(x,y) dxdy= \int_{\Omega'} \left( \int_{M_x} f \right)dx ,$$
and that this can be rigorously proved by exhibiting a vector valued projection whose level sets are precisely the submanifolds $M_x$ and whose coarea factor is identically equal to 1. But maybe I am wrong or maybe it's simpler, I am not sure.
Here’s the special case of what I mentioned in the link.
So, the point is that we have $Z=\bigcup\limits_{x\in X}Y_x$, and the map $\phi$ tells us how these diffeomorphic slices of $Y$ fit together to form $Z$. Also, the map $J$ contains all the information about the Jacobian factors; for example in the denominator, the $|\det D\phi|$ term is exactly what comes up from the change of variables $X\times Y\to Z$. Then, we use the standard Fubini theorem to write $\int_{X\times Y}=\int_X\int_Y$, and then the stuff in the numerator of $J$ is exactly there because it encodes the factor from the change of variables on the submanifold, $Y\to Y_x$ which is how we finally end up with $\int_X\int_{Y_x}$. Also, if you want to integrate not over all of $Z$ but only a subset $E\subset Z$, then simply replace $g$ with $g\cdot 1_E$; this has the same effect.
If you now compare with the coarea formula, the analogy should be clear; instead of $f$, we have $\phi$ which gives rise to a decomposition of $Z$, and furthermore, $g|\nabla f|$ is replaced by $gJ$ for a suitable $J$. And yes, in the case $m=1$ (so that we have curves) the numerator of $J$ amounts to $\|\gamma_x’(t)\|$ (in your notation from the comments).