We employ the exact-factorization formalism to study the coupled dynamics of photons, electrons, and nuclei at the quantum mechanical level, proposing illustrative examples of model situations of nonadiabatic dynamics and spontaneous emission of electron–nuclear systems in the regime of strong light–matter coupling. We make a particular choice of factorization for such a multi-component system, where the full wavefunction is factored as a conditional electronic amplitude and a marginal photon–nuclear amplitude. Then, we apply the coupled-trajectory mixed quantum–classical (CTMQC) algorithm to perform trajectory-based simulations, by treating photonic and nuclear degrees of freedom on equal footing in terms of classical-like trajectories. The analysis of the time-dependent potentials of the theory along with the assessment of the performance of CTMQC allows us to point out some limitations of the current approximations used in CTMQC. Meanwhile, comparing CTMQC with other trajectory-based algorithms, namely multi-trajectory Ehrenfest and Tully surface hopping, demonstrates the better quality of CTMQC predictions.