Phase transitions occur in a wide range of physical systems and are characterized by the abrupt change of a physical observable in response to the variation of an external control parameter. Phase transitions are not restricted to equilibrium situations but can also be found in nonequilibrium settings, both for classical and quantum mechanical systems. Here, we investigate a nonequilibrium phase transition in a single-electron micromaser consisting of a microwave cavity that is driven by the electron transport in a double quantum dot. For weak electron-photon couplings, only a tiny fraction of the transferred electrons lead to the emission of photons into the cavity, which essentially remains empty. However, as the coupling is increased, many photons are suddenly emitted into the cavity. Employing ideas and concepts from full counting statistics and Lee-Yang theory, we analyze this nonequilibrium phase transition based on the dynamical zeros of the factorial moment generating function of the electronic charge transport, and we find that the phase transition can be predicted from short-time measurements of the higher-order factorial cumulants. These results pave the way for further investigations of critical behavior in open quantum systems.