Trapping of Electrons in Large-Amplitude Electrostatic Fields Resulting from Beam-Plasma Interaction