on the integration by parts infinitely many times
I don't see how the repeated IBP formula can imply the limit you mention is $0$, even when the integrand is smooth. For example, with $f(x) = e^x$ and $g(x) = \sin x$, then the limit does not tend (even pointwise) to $0$. Instead, there is a "repetition" in the formula that allows one to carry out the integration:
$$\int e^x \sin x \;dx = e^x(-\cos x) - e^x(-\sin x) + \int e^x(-\sin x) \;dx$$
$$ 2\int e^x \sin x \; dx = e^x(\sin x - \cos x) $$
$$ \int e^x \sin x \; dx = \frac{e^x}{2}(\sin x - \cos x)$$
So you see the "summation" implied by multiple IBP need not converge in the sense that the sum $\sum_{n \geq 0} \frac{x^n}{n!}$ converges. All that one needs for multiple IBP is some finite number of terms to work with.
Hope this helps!
This question is related with Recursive integration by parts general formula.
As a comment there states, the "reminder terms" must tend to zero: suppose a function $f$ is infinitely many times differentiable and let $p$ be integrable. Denote the $n$-th derivade of $f$ by $f^{(n)}$ and the the $n$-th repeated integral of $g$ by $g^{(-n)}$.
The $N$-th teration of integration by parts gives $$ \int fg = \sum\limits_{n=0}^{N-1} (-1)^n f^{(n)} g^{(-(n+1))} + {\color{red}{ (-1)^N \int f^{(N)} g^{(-N)}}}.$$ If, as $N\to\infty$, the "reminder terms" $${\color{red}{ (-1)^N \int f^{(N)} g^{(-N)}}}$$ tend to zero, then \begin{equation*}%\label{eq:recursive_int_by_parts_formula} \boxed{\int fp = \sum\limits_{n=0}^{\infty} (-1)^n f^{(n)} g^{(-(n+1))} } . \end{equation*}
In addition, for all $N\in\mathbb{N}$, Cauchy formula for repeated integration yields, with arbitrary real $o$, $$g^{(-(n+1))} (x) = \frac{1}{n!}\int\limits_{o}^{x} (x-t)^n g(t)dt.$$ The $n$-th iterated indefinite integral of $g$, as antiderivative, is the same up to a polynomial of degree $n$ due to the arbitrary constant summand of each integral. Observe that Cauchy formula for repeated integration yields a specific $n$-th antiderivative depending on $o$.
If the reminder terms tend to zero, then one formula for integration of product of functions is \begin{equation*} \boxed{ \int f(x)p(x)dx = \sum\limits_{n=0}^{\infty} \frac{1}{n!} f^{(n)}(x) \int\limits_{o}^{x} (t-x)^n p(t)dt }, \end{equation*}