Is $\mathbb{Z}[x]/(x^2+2x+1)$ isomorphic to a product of non-trivial rings?
First observe that $\mathbb{Z}[x]/\left<x^{2}+2x+1\right>\cong\mathbb{Z}[y]/\left<y^{2}\right>$ with $x+1\rightarrow y$. Now consider a general element $ay+b\in\mathbb{Z}[y]/\left<y^{2}\right>$. You want to have
$$\left(ay+b\right)^2=ay+b$$
or
$$2aby+b^2=ay+b$$
which translates into
$$2ab=a \:\:\wedge\:\: b^2=b$$
From the second equation $b=1,0$. If $b=0$ then $a=0$ and that's a trivial idempotent you don't want. If $b=1$ then $a=0$ again and you get the identity which is again trivial. Thus in this ring you don't have non-trivial idempotents, and as a conclusion it is not a product of non-trivial rings.
Here's a more general result:
If $R$ is a commutative ring, and $\mathfrak{p}\subset R$ is a prime ideal, then for all $n$, $R/\mathfrak{p}^n$ cannot be written as a non-trivial product of rings.
To prove it, first note the $n=1$ case works because then $R/\mathfrak{p}$ is an integral domain. [Although the proof below works for this case, I think it's nice to call it out separately.]
For the $n>1$ case, suppose that $R/\mathfrak{p}^n\cong S\times T$. Now every prime ideal of $S\times T$ looks like either $\mathfrak{s}\times T$ or $S\times\mathfrak{t}$. Since $\mathfrak{p}/\mathfrak{p}^n$ is prime in $R/\mathfrak{p}^n$, it looks like, say, $\mathfrak{s}\times T$. We have \begin{align} 0 &= \left(\mathfrak{p}/\mathfrak{p}^n\right)^n\\ &= (\mathfrak{s}\times T)^n\\ &= \mathfrak{s}^n\times T \end{align} which implies $T$ is trivial, and hence the product decomposition was trivial.