  Thermal electrons have gyroradii many orders of magnitude smaller than the
finite width of a shock, thus need to be pre-accelerated before they can cross
it and be accelerated by diffusive shock acceleration. One region where
pre-acceleration may occur is the inner foreshock, which upstream electrons
must pass through before any potential downstream crossing. In this paper, we
perform a large scale particle-in-cell simulation that generates a single shock
with parameters motivated from supernova remnants. Within the foreshock,
reflected electrons excite the oblique whistler instability and produce
electromagnetic whistler waves, which co-move with the upstream flow and as
non-linear structures eventually reach radii of up to 5 ion-gyroradii. We show
that the inner electromagnetic configuration of the whistlers evolves into
complex non-linear structures bound by a strong magnetic field around 4 times
the upstream value. Although these non-linear structures do not in general
interact with co-spatial upstream electrons, they resonate with electrons that
have been reflected at the shock. We show that they can scatter, or even trap,
reflected electrons, confining around $0.8\%$ of the total upstream electron
population to the region close to the shock where they can undergo substantial
pre-acceleration. This acceleration process is similar to, yet approximately 3
times more efficient than, stochastic shock drift acceleration.
