We present a theory for the two kinds of dynamical quantum phase transitions, termed DPT-I and DPT-II, based on a minimal set of symmetry assumptions. In the special case of collective systems with infinite-range interactions, both are triggered by excited-state quantum phase transitions. For quenches below the critical energy, the existence of an additional conserved charge, identifying the corresponding phase, allows for a nonzero value of the dynamical order parameter characterizing DPTs-I, and precludes the main mechanism giving rise to nonanalyticities in the return probability, trademark of DPTs-II. We propose a statistical ensemble describing the long-time averages of order parameters in DPTs-I, and provide a theoretical proof for the incompatibility of the main mechanism for DPTs-II with the presence of this additional conserved charge. Our results are numerically illustrated in the fully connected transverse-field Ising model, which exhibits both kinds of dynamical phase transitions. Finally, we discuss the applicability of our theory to systems with finite-range interactions, where the phenomenology of excited-state quantum phase transitions is absent. We illustrate our findings by means of numerical calculations with experimentally relevant initial states.