The updated version is indeed correct. I will show that the sum is finite for almost all $T\in [1, 2]$ but it should be applicable for all $T\in (0, \infty)$.
The reason why the result can fail for a particular $T$ is that our function $f$ can resemble too closely $\delta$-function at the point $T$ so that we will be summing ones and get infinity. But in that case for (say) all smaller $T$ we will just have sum of zeroes and the sum will be finite. So, we have to somehow find balance between different $T$'s, and the natural way to do it is to introduce some averaging.
First, let us turn your sum into a more human-friendly form. By Fubini we have (I use $f(t)$ in place of $|f(t)|$ since we can always assume that $f$ is positive)
$$\sum_{n = 1}^\infty e^{-n^2T}\int_0^T e^{n^2t}f(t)dt = \int_0^T f(t)\sum_{n = 1}^\infty e^{n^2(t-T)}dt.$$
The sum that we have here is a (half of) the theta-function, and asymptotics of it is known: it is proportional to $\frac{1}{\sqrt{T-t}}$ (at least in the regime $0 < T-t < 1$ that we will consider). In particular, since it is not in $L^\infty$, we can find $f$ such that for a given $T$ the integral would be infinite. But now we will use many $T$'s at once by integrating this over $T\in [1, 2]$. I will also assume that $f(t) = 0, t < 1$ for simplicity, for $T > 1$ this does not affect convergence issues at all. We have
$$\int_1^2 \int_1^T \frac{f(t)}{\sqrt{T-t}}dtdT = \int_1^2f(t)\int_t^2\frac{1}{\sqrt{T-t}}dTdt = \int_1^2f(t) 2\sqrt{2-t}dt \le \\2\int_1^2 f(t)dt < \infty,$$
since $f(t)$ is in $L^1_{loc}$. In particular, our sum is finite for almost all $T\in [1, 2]$.
Note that it is crucial that we have $n^2$ and not $n$, otherwise we would've had to integrate singularity of order $\frac{1}{T-t}$ which would give us unbounded $\log(T-t)$.