  For an infinite iterated function system $\mathbf{f}$ on $[0,1]$ with an
attractor $\Lambda(\mathbf{f})$ and for an infinite subset $D\subseteq
\mathbb{N}$, consider the set \[ \mathbb E(\mathbf{f},D)= \{ x \in
\Lambda(\mathbf{f}): a_n(x)\in D \text{ for all }n\in\mathbb N \text{ and
}\lim_{n\to\infty} a_n=\infty\}. \] For a function $\varphi:\mathbb{N}\to [\min
D, \infty)$ such that $\varphi(n)\to\infty$ as $n\to\infty$, we compute the
Hausdorff dimension of the set $$ S(\mathbf{f},D,\varphi) = \left\{ x\in
\E(\mathbf{f},D) : a_n(x)\leq \varphi(n) \text{ for all } n\in\mathbb N
\right\}. $$ We prove that the Hausdorff dimension stays the same no matter how
slowly the function $\varphi$ grows. One of the consequences of our result is
the recent work of Takahasi (2023), which only dealt with regular continued
fraction expansions. We further extend our result to slowly growing products of
(not necessarily consecutive) digits.
