In this answer, I assume $\mathbb{Z}_2=\mathbb{Z}/2\mathbb{Z}=\mathbb{F}_2$. Note that the splitting field of $x^8-x$ over $\mathbb{F}_2$ is $\mathbb{F}_{2^3}$. Therefore, $x^8-x=x(x-1)\,q(x)\,r(x)$ for some irreducible polynomials $q(x),r(x)\in\mathbb{F}_2[x]$ of degree $3$. From here, we can easily see that, without loss of generality,
$$q(x):=x^3+x+1\text{ and }r(x):=x^3+x^2+1\,.$$
Thus, if $f(x)+\langle x^7+1\rangle \in\mathbb{F}_2[x]/\langle x^7+1\rangle$ is idempotent, then
$$f(x)\,\big(f(x)-1\big)=\big(f(x)\big)^2-f(x)$$
is divisible by
$$x^7+1=p(x)\,q(x)\,r(x)\,,$$
where $p(x):=x-1=x+1$. Thus, there are $2^3=8$ possible polynomials $f(x)$ modulo $x^7+1$ that works, depending on the subset $S\subseteq \big\{p(x),q(x),r(x)\big\}$ which contains the factors that divides $f(x)$ such that $f(x)-1$ is divisible by the factors that are in $\big\{p(x),q(x),r(x)\big\}\setminus S$. Here is the list of all of them (found using the Chinese Remainder Theorem):
- for $S=\emptyset$, $f(x)=1$;
- for $S=\big\{p(x)\big\}$, $f(x)=x^6+x^5+x^4+x^3+x^2+x$;
- for $S=\big\{q(x)\big\}$, $f(x)=x^4+x^2+x$;
- for $S=\big\{r(x)\big\}$, $f(x)=x^6+x^5+x^3$;
- for $S=\big\{p(x),q(x)\big\}$, $f(x)=x^6+x^5+x^3+1$;
- for $S=\big\{r(x),p(x)\big\}$, $f(x)=x^4+x^2+x+1$;
- for $S=\big\{q(x),r(x)\big\}$, $f(x)=x^6+x^5+x^4+x^3+x^2+x+1$;
- for $S=\big\{p(x),q(x),r(x)\big\}$, $f(x)=0$.
(Observe that the four polynomials in the bottom of the list are obtained from the four polynomials in the top of the list by adding $1$, so you need to determine only four of the polynomials.)