The polynomial $p(x) = x^5-x + 2$ is not reducible in $\mathbb {Z}$ (i.e mod $0$). Since it does not have a linear factor, so there is only the case where $p (x) = q (x) r (x)$, where $\deg (q) = 3$ and $\deg (r) = 2$. I have tried to show it by taking the polynomials $p (x) = (x^3+ax^2+bx+c)\cdot (x^2+dx+e)$ to get to the system of equations $$\left\{\begin{matrix} d+a=0\\ e+ad+b=0\\ ae+bd+c=0\\ be+dc=-1\\ ce=2 \end{matrix}\right.$$
but I cannot come to a contradiction, I would appreciate your help
HINT.-A way is to show, as you want to do, that $p (x) = (x^3+ax^2+bx+c)\cdot (x^2+dx+e)$ is not possible in $\mathbb Z[x]$ but avoiding to go to your system of five equations. For this note that $p(0)=p(1)=p(-1)=2$ so you have the system $$\begin{cases}ce=2\\(1+a+b+c)(1+d+e)=2\\(-1+a+b+c)(1-d+e)=2\end{cases}$$ From this you have $(c,e)$ is equal to $(1,2)$ or $(2,1)$ then you get $d=0,\space\space a-b=1$ and $a+b=-2$.
It follows that $a=\dfrac{-1}{2}$ and $b=\dfrac{-3}{2}$.
Thus the coefficients $a$ and $b$ are not rational integers and your factors $q(x)$ and $r(x)$ are not in $\mathbb Z[x]$.