Find polynomial with the lowest degree 
Find all polynomial $f\in \mathbb{Z}[x]$ with the lowest degree
satisfying the condition: there exists $g,h\in \mathbb{Z}[x]$ such that
$$\big(f(x)\big)^4+2f(x)+2=(x^4+2x^2+2)g(x)+3h(x)$$

This question in Korea Winter Program 2021, a program that selects students to participate IMO, it means just a question for student without field knowledge.
I considered the remainder $\pmod{x^4+2x^2+2}$ in $\mathbb{Z}_3[x]$ and had an ugly solution with a lot of case. I wonder if there is a nice and not too cumbersome solution.

You probably are allowed to quote Eisenstein criterion here, so $p(x)=x^4+2x+2$ and $q(x)=x^4+2x^2+2$ are irreducible polynomials in $\mathbb{Z}[x]$.
If you have seen solving two polynomials $P(x,y)=Q(x,y)=0$ using resultants, then it is all routine.  You can do it without resultants but it will just be messier (though doable) to eliminate $x$.
Clearly $\deg f\leq 3$ since you can always reduce $f$ mod $x^4+2x^2+2$.  Also clear that $\deg f=0,1$ don't work.  So reduce to either $f(x)=ax^2+bx+c$ or $f(x)=ax^3+bx^2+cx+d$.
If $f(x)=ax^2+bx+c$, then eliminating $x$ from $x^4+2x^2+2=0$, $ax^2+bx+c-y=0$ as equations with mod 3 coefficients gives
$$
\begin{vmatrix}
1&&2&&2\\
&1&&2&&2\\
a&b&c-y\\
&a&b&c-y\\
&&a&b&c-y\\
&&&a&b&c-y\\
\end{vmatrix}=0
$$
or:
$$
y^4
+4(a-c)y^3
+2(4 a^2 + b^2 - 6 a c + 3 c^2)y^2 
+4(2 a^3 + 2 a b^2 - 4 a^2 c - b^2 c + 3 a c^2 - c^3)y 
+(4 a^4 + 4 a^2 b^2 + 2 b^4 - 8 a^3 c - 8 a b^2 c + 8 a^2 c^2 + 2 b^2 c^2 - 4 a c^3 + c^4) 
=0
$$
(Yes, I know this is supposed to be mod 3 so a lot of simplifications are possible here, but for demonstration sake I will not simplify beyond what usual determinant for just this one time.)  Since $a,b,c\in\mathbb{Z}/3$, that simplifies to
$$
y^4
+(a-c)y^3
+2(a^2 + b^2)y^2 
+\dots 
=0
$$
But we want $y$ to also satisfy $y^4+2y+2=0$.  This is only possible if $a=c$ (coefficient of $y^3$) and $a^2+b^2=0$ (coefficient of $y^2$) which therefore give $a=b=c=0$ which doesn't work.
So the minimal degree $f$ must be 3, and same procedure gives the 4 possible $f$ mod 3 that field theory says there must be.  So we start with
$$
\begin{vmatrix}
1&&2&&2\\
&1&&2&&2\\
&&1&&2&&2\\
a&b&c&d-y\\
&a&b&c&d-y\\
&&a&b&c&d-y\\
&&&a&b&c&d-y\\
\end{vmatrix}=0
$$
or
$$
y^4+(b-d) y^3+\dots=0
$$
as equation mod 3.  Coefficient of $y^3$ gives $b=d$, now continue further:
$$
y^4 - (a^2 + b^2 + c^2) y^2 +\dots = 0
$$
Equating coefficient of $y^2$ to 0 says $a,b,c$ are either all zero or all nonzero.  So $b=d\neq 0$, $a^2=b^2=c^2=1$, and we have
$$
y^4 + 2 a b c y + 2 = 0
$$
So we need to impose $abc=1$, i.e., an even number of $-1$ there.  Lifting the result back to $\mathbb{Z}[x]$, the solutions are $f(x)=ax^3+bx^2+cx+d$ for $a,b,c,d\in\mathbb{Z}$ such that
$$
(a,b,c,d)\equiv (1,-1,-1,-1),(-1,1,-1,1),(-1,-1,1,-1),(1,1,1,1)\pmod{3}.
$$
