Here is an argument based on the idea of @mathex's answer.:
Lemma. Let $X, Y \in L^1(\mathbf{P})$ be such that $X \sim Y$ and $\mathbf{E}[Y\mid X]=X$. Then, for any $k\in\mathbb{R}$,
$$ \mathbf{E}[Y\wedge k\mid X\wedge k] = X\wedge k
\quad\text{and}\quad
\mathbf{E}[Y\vee k\mid X\vee k] = X\vee k.$$
Proof of Lemma. We only prove the first part. Let $Z = X \wedge k - \mathbf{E}[Y\wedge k\mid X\wedge k]$. Then
$$ \mathbf{E}[Z]
= \mathbf{E}[X \wedge k] - \mathbf{E}[Y \wedge k]
= 0. $$
So it suffices to prove that $Z \geq 0$. However, this follows from
\begin{align*}
\mathbf{E}[Y\wedge k\mid X\wedge k]
&\leq \mathbf{E}[Y\mid X\wedge k]\wedge k \tag{$\because$ Jensen} \\
&= \mathbf{E}[\mathbf{E}[Y\mid X]\mid X\wedge k]\wedge k \\
&= \mathbf{E}[X\mid X\wedge k]\wedge k \\
&= X \wedge k,
\end{align*}
completing the proof of the lemma. $\square$
Now we return to the original question. By the lemma, for any $n \geq 1$ and with the truncation function
$$ f_n(x) = (-n) \vee (x \wedge n) = \begin{cases}
-n, & x < -n \\
x, & -n \leq x \leq n, \\
n, & x > n
\end{cases} $$
we get $\mathbf{E}[f_n(Y) \mid f_n(X)] = f_n(X)$. Since $f_n(X)$ and $f_n(Y)$ are bounded, arguing as in OP, we get
$$f_n(X) = f_n(Y).$$
Now we conclude by letting $n \to \infty$.