A key to ultralong electron spin memory in quantum dots (QDs) at zero magnetic field is the polarization of the nuclei, such that the electron spin is stabilized along the average nuclear magnetic field. We demonstrate that spin-polarized electrons in n-doped (In,Ga)As/GaAs QDs align the nuclear field via the hyperfine interaction. A feedback onto the electrons occurs, leading to stabilization of their polarization due to formation of a nuclear spin polaron [I. A. Merkulov, Phys. Solid State 40, 930 (1998).]. Spin depolarization of both systems is consequently greatly reduced, and spin memory of the coupled electron-nuclear spin system is retained over 0.3 sec at temperature of 2 K.