It has been proposed recently that the breaking of magnetohydrodynamics (MHD) waves in the inner magnetosphere of strongly magnetized neutron stars can power different types of high-energy transients. Motivated by these considerations, we study the steepening and dissipation of a strongly magnetized fast magnetosonic wave propagating in a declining background magnetic field, by means of particle-in-cell simulations that encompass MHD scales. Our analysis confirms the formation of a monster shock as B^{2}-E^{2}→0, that dissipates about half of the fast magnetosonic wave energy. It also reveals, for the first time, the generation of a high-frequency precursor wave by the monster shock, carrying a fraction of ∼10^{-3} of the total energy dissipated at the shock. The spectrum of the precursor wave exhibits several sharp harmonic peaks, with frequencies in the gigahertz band under conditions anticipated in magnetars. Such signals may appear as fast radio bursts.