  The choice of electrostatic gating over the conventional chemical doping for
phase engineering of quantum materials is attributed to the fact that the
former can reversibly tune the carrier density without affecting the system's
level of disorder. However, this proposition seems to break down in
field-effect transistors involving SrTiO$_3$ (STO) based two-dimensional
electron gases. Such peculiar behavior is associated with the electron trapping
under an external electric field. However, the microscopic nature of trapping
centers remains an open question. In this paper, we investigate electric
field-induced charge trapping/detrapping phenomena at the conducting interface
between band insulators $\gamma$-Al$_2$O$_3$ and STO. Our transport
measurements reveal that the charge trapping under +ve back gate voltage
($V_g$) above the tetragonal to cubic structural transition temperature ($T_c$)
of STO is contributed by the electric field-assisted thermal escape of
electrons from the quantum well, and the clustering of oxygen vacancies (OVs)
as well. We observe an additional source of trapping below the $T_c$, which
arises from the trapping of free carriers at the ferroelastic twin walls of
STO. Application of -ve $V_g$ results in a charge detrapping, which vanishes
above $T_c$ also. This feature demonstrates the crucial role of structural
domain walls in the electrical transport properties of STO based
heterostructures. The number of trapped (detrapped) charges at (from) the twin
wall is controlled by the net polarity of the wall and is completely reversible
with the sweep of $V_g$.
