Electron–phonon coupling in two-photon spectral gratings: role of molecular symmetry