Electron–phonon coupling and charge-transfer excitations in organic systems from many-body perturbation theory