Since $h_k := \prod_{i=1}^k \phi_{p^i} = (X^{p^k}-1)/(X-1)$, you are trying to compute the exponent of the cokernel of the inclusion $$\mathbf{Z}[X]/(h_k) \rightarrow \prod_{i=1}^k \mathbf{Z}[\zeta_{p^i}]$$ that is of finite index (since it becomes an isomorphism upon tensoring with $\mathbf{Q}$). We will prove that the exponent of the cokernel is always exactly $p^{k-1}$, as you guessed from examples. First we show it divides $p^{k-1}$, and then we revisit the argument to get the exact equality. The key input to the proof is an understanding of the basic ramification theory of cyclotomic integer rings (as in any basic book on algebraic number theory), together with a little bit of visualization coming from algebraic geometry inside the affine line over $\mathbf{Z}$. To show that the exponent of the cokernel divides $p^{k-1}$ we proceed by induction on $k$, the case $k=1$ being clear. For $k \ge 2$, consider the natural map $$\mathbf{Z}[X]/(h_k) \rightarrow (\mathbf{Z}[X]/(h_{k-1})) \times_{\mathbf{F}_p[\varepsilon]/(\varepsilon^{p^{k-1}}-1)} \mathbf{Z}[\zeta_{p^k}]$$ where the fiber product ring has first projection $X \mapsto 1 + \varepsilon$ and second projection $\zeta_{p^k} \mapsto 1+\varepsilon$. A separate induction on $k$ using ramification theory of $p$-power cyclotomic fields shows that this map of rings is an *isomorphism*; see Lemmas 2.2 and 2.3 in the paper "Finite-order automorphisms of a certain torus" in Michigan Math Journal. (In algebro-geometric terms, this inductively describes how ${\rm{Spec}}(\mathbf{Z}[X]/(h_k))$ is built via "gluing along closed subschemes" inside the affine line over $\mathbf{Z}$ via the various closed subschemes given by ${\rm{Spec}}(\mathbf{Z}[\zeta_{p^i}])$ for $i \le k$.) This ring isomorphism onto the fiber product is compatible with the initial inclusion we are trying to study. So taking $k \ge 2$, by induction if we multiply an element $$(z_1,\dots, z_{k-1}) \in \prod_{i=1}^{k-1} \mathbf{Z}[\zeta_{p^i}]$$ by $p^{k-2}$ then we get something inside $\mathbf{Z}[X]/(h_{k-1})$. Choosing an additional element $z_k \in \mathbf{Z}[\zeta_{p^k}]$, the obstruction to having $$(p^{k-2}z_1,\dots,p^{k-2}z_{k-1},p^{k-2}z_k) \in \mathbf{Z}[X]/(h_k)$$ is whether or not the images of $(p^{k-2}z_1,\dots,p^{k-2}z_{k-1})$ and $p^{k-2}z_k$ in $\mathbf{F}_p[\varepsilon]/(\varepsilon^{p^{k-1}}-1)$ coincide. Maybe they do, or maybe they don't, but certainly if we multiply both sides by $p$ then their images in $\mathbf{F}_p[\varepsilon]/(\varepsilon^{p^{k-1}}-1)$ coincide (in fact, are each 0). Hence, we conclude that multiplying throughout by $p^{k-1}$ puts us inside the fiber product ring which coincides naturally with $\mathbf{Z}[X]/(h_k)$. This completes the induction on $k$, so indeed the exponent always divides $p^{k-1}$. Now we revisit the induction to show that the exponent is *exactly* $p^{k-1}$. For $k=1$ this is obvious, so assume $k > 1$ and by induction we can find $(z_1,\dots,z_{k-1})$ such that no $p^i$ with $0 \le i < k-2$ multiplies $(z_1,\dots,z_{k-1})$ into $\mathbf{Z}[X]/(h_{k-1})$. Hence, for any $z_k \in \mathbf{Z}[\zeta_{p^k}]$ it follows that the least $i \ge 0$ such that $p^i(z_1,\dots,z_k) \in \mathbf{Z}[X]/(h_k)$ is either $i=k-2$ or $i=k-1$. We therefore just need to find $z_k$ so that the elements $(p^{k-2}z_1,\dots,p^{k-2}z_{k-1}) \in \mathbf{Z}[X]/(h_{k-1})$ and $p^{k-2}z_k \in \mathbf{Z}[\zeta_{p^k}]$ have *distinct* images in $\mathbf{F}_p[\varepsilon]/(\varepsilon^{p^{k-1}}-1)$. By design our element in $\mathbf{Z}[X]/(h_{k-1})$ is *not* divisible by $p$ in here, so its image under the first projection of the fiber product is nonzero (as that projection is readily seen to be exactly "reduction modulo $p$"). Thus, if $k > 2$ then we win for any $z_k$ (as $p^{k-2}z_k$ has vanishing image under the second projection in the fiber product). Finally, to backstop and deal with $k=2$, in that case we just have to pick $z_2 \in \mathbf{Z}[\zeta_{p^2}]$ so that its image in $\mathbf{F}_p[\varepsilon]/(\varepsilon^p-1)$ avoids a specified nonzero element. But that second projection in the fiber product is visibly surjective and there is more than one nonzero element in $\mathbf{F}_p[\varepsilon]/(\varepsilon^p-1)$ (almost a close call when $p=2$), so a suitable $z_k$ can always be found. QED