Probing electron-phonon interactions in the charge-photon dynamics of cavity-coupled double quantum dots