Say you have the polynomial $$ x^4 + 2 + x^{-4} $$
Looking at it, you see you can do $$\begin{align*} x^4 + 1 + 1 + x^{-4} & =x^2( x^2 + x^{-2} ) + x^{-2}( x^2 + x^{-2} )\\ &= \left( x^2 + x^{-2} \right)^2. \end{align*}$$ Another one is $$\begin{align*} x^2 + \frac{1}{2} + \frac{1}{16x^2} &= x^2 + \frac{1}{4} + \frac{1}{4} + \frac{1}{16x^2} \\ &=x^2\left( 1 + \frac{1}{4x^2} \right) + \frac{1}{4}\left( 1 + \frac{1}{4x^2} \right)\\ &=\left( x^2 + \frac{1}{4}\right) \left( 1 + \frac{1}{4x^2} \right)\\ (x^2) \left( 1 + \frac{1}{4x^2} \right)^2. \end{align*}$$
So the question is, I've been doing this by "inspection" - are there any techniques for recognizing when this type of factorization is possible or how to do more easily?
For trinomials:
If you have $(p(x))^2 + K + (q(x))^2$, then check to see if $K = \pm 2p(x)q(x)$. if so, then $(p(x))^2 + K + (q(x))^2 = (p(x)\pm q(x))^2$.
More generally, if you have $(p(x))^2 + Kp(x) + L$, then see if you can find two expressions, $s(x)$ and $t(x)$, which when multiplied give $L$ and when added give $K$, $s(x)t(x) = L$, $s(x)+t(x) = K$. Then $(p(x))^2 + Kp(x) +L = (p(x)+s(t))(p(x)+t(x))$.
But generally, there is some substantial amount of "inspect and notice" going on. The more of these you do, the more you will notice patterns and be able to "notice" the things that one needs to notice.