This proof was in one of the posts you linked, but hopefully I can present it in a way that explains the visual intuition behind it a bit more, and why this is actually more general than just $\sin(x)^2$.
In a sense, the fact that it is a sine wave isn't really the important part. You can probably sense that taking a slightly different shape than $\sin(x)^2$ won't affect whether or not this integral converges. In my mind, the convergence has more to do with the fact that $\sin(x)^2$ is akin to a periodic step function. We can indeed bound it with one as you can see below.

So instead of $\sin(x)^2$, let's consider the periodic function:
$$
f(x) :=
\begin{cases}
0 &\text{if } \lfloor x\rfloor \text{ is even}, \\
1 &\text{if } \lfloor x\rfloor \text{ is odd},
\end{cases}
$$
which just alternates between $0$ and $1$ every interval of length $1$. Now we can consider the simpler integral:
$$
\int_0^\infty \frac{f(x)}{x}\,dx.
$$
Here's a graph of what $\frac{f(x)}{x}$ looks like

Notice that our integral becomes a sum of integrals of $\frac{1}{x}$ over every other interval of length $1$:
$$
\int_0^\infty \frac{f(x)}{x}\,dx
= \sum_{n=1}^{\infty} \int_{2n-1}^{2n} \frac{1}{x}\,dx,
$$
but since $x\mapsto\frac{1}{x}$ is a decreasing function, we can bound it by the upper limit of these integrals, and so:
$$
\int_0^\infty \frac{f(x)}{x}\,dx
\geq \sum_{n=1}^{\infty} \int_{2n-1}^{2n} \frac{1}{2n}\,dx
= \sum_{n=1}^{\infty} \frac{1}{2n}.
$$
But the harmonic series $\sum_{n=1}^{\infty} \frac{1}{n}$ is famously divergent, and so our integral diverges too! In fact, one of the ways to show the harmonic series diverges is to compare it to the whole integral of $\frac{1}{x}$ over $(1,+\infty)$.
Those arguments would be true for any positive periodic function, since you can always bound them by periodic step functions. A possible way to think about it is this: periodically cutting out parts of $\frac{1}{x}$ is never enough to make the integral converge, since you can always compare it to a rescaled version of $\frac{1}{x}$. That itself is true because rescaling the $x$-axis by some constant $\alpha$ just amounts to rescaling $\frac{1}{x}$ by $\frac{1}{\alpha}$.
That's not to say that this an obvious characteristic you should remember by heart. I think the better lesson is to play around with the parameters of an integral, try to see what affects it the most drastically, and really focus on that. Everything else is just flavor, which tends to get in the way of simpler formulas.