It's impossible for an electron not to encounter some electromagnetic radiation. Even if we try and screen our experiment by putting it in a Faraday cage there will be some black body radiation from any parts of the equipment not at absolute zero.
What matters is that the energy of the photons must be much less than the energy of the electron. In that case the photon cannot disturb the electron enough to spoil the diffraction pattern. In a typical electron diffraction experiment the electron energy will be around 1 to 10 keV, and the energy of visible light photons is around 1 eV. So the electron energy is $10^3$ to $10^4$ times greater than the energy of the light. That's why visible light doesn't spoil the diffraction pattern. If we started shining X-rays at our experiment that would be a different matter. At those energies we'd expect to get substantial Compton scattering and our diffraction pattern would be affected.
So we don't need to create a photonless area, and that's just as well because it's impossible to do.