Does The ISW Effect Predict Net Redshift Over Distance? The Integrated Sachs–Wolfe (ISW) effect is concerned primarily with the study of the Cosmic Background Microwave Radiation (CMBR), but seems to demonstrate that photons passing through voids suffer a net energy loss resulting in redshift, or can be blueshifted passing through high-density regions.

If a photon traveled long enough through alternating high and low density regions of space, can we assume that (depending upon the total ratio of density to void in all the regions traversed) our photon might well accumulate a substantial net gravitational redshift or blueshift after traveling a vast distance?
The (late time) ISW is caused by the evolution of cosmic structures as photons of the cosmic microwave background traverse them on their way to our detectors. It may cause a redshift or blueshift with respect to the redshift predicted for a homogeneous expanding universe.

A bit more detail: If a photon "falls" into a potential well, its frequency and energy increase. But as it exits the potential well it loses the same amount of energy. In a similar way, if a photon crosses a "void", it loses and then gains energy.

However, if the universe contains dark energy (the ISW does not work in a flat universe containing just matter) and is expanding, then the structures the photons traverse are evolving with cosmic time such that the process is asymmetric. A potential well is "smeared out" a little by the expansion, and the photon does not lose as much energy exiting, as it gained on entering. Ditto for a void, but in reverse.

The net effect is small blue- and redshifts (of order 1 part in 100,000 at low spatial frequencies) with respect to the overall redshift you would expect anyway from the cosmic expansion of a homogeneous universe. These shifts are expected to be correlated with the cosmic structures in the same line of sight. The ISW has been detected (albeit with low significance) for the past decade, by cross-correlating CMB spatial variations with catalogues that map out the large scale cosmic structure (e.g. high redshift radio galaxy catalogues). See Nishizawa (2014) for a review.