Impact of electron-phonon interactions on phonon transport in diamond and c-BN