Suppose $Y$ is a closed hyperplane in $X$, so write $X=Y\oplus[x_0]$. Let $y_n$ be a normalized basis of $Y$. Define an operator $S:Y\to Y\oplus[x_0]$ by $Sy_n=\\alpha_ny_n+\beta_nx_0$, for any $n=1,2,\dots$. We can choose $\alpha_n\to 0$ and $\beta_n\to 0$ such that $S$ is compact. Can we find a non-trivial subspace $Z$ of $Y$ such that $S(Z)\subseteq Z$?
Edit: I previously posted a more general question, but I just realized it has a negative answer. This is the concrete example I have.