In another proof I stumbled over the following question.
Let $(e_n)$ be an ONB of $L^2$ on a compact domain and $f \in L^1.$(this is the point here, $f$ is a priori not in $L^2$).So we have $L^2 \subset L^1$. Now, we have $\langle f, e_n \rangle =0$ for $n \ge 5$ and $\langle f,e_i \rangle$ for $i \in \{1,...,4\}$ exists and is finite.
Does this imply that $f \in span(e_1,...,e_4)$?
In case that this is true, maybe a density argument could lead to something, I would say, but this is really the only idea I have.
Proof for the Fourier series case, $L^2([0,2\pi])$: Here we take $e_n(x) = e^{inx}, n \in \mathbb {Z}.$ Suppose $f\in L^1([0,2\pi])$ and $\langle f,e_n \rangle = 0, n \in \mathbb {Z}\setminus \{1,2,3,4\}.$ Poisson integral theory says
$$P_r[f](t) = \sum_{n\in \mathbb {Z}}\hat {f}(n)r^{|n|}e^{int}$$
converges to $f$ in $L^1$ as $r\to 1^-.$ But the sum above is the sum only over $n=1,2,3,4$ and the limit of this in $L^1$ is clearly $\sum_{n=1}^{4}\hat {f}(n)e^{int}.$ Hence $f$ equals this last sum.