This is an interesting article about the interaction of quantum effects and gravity. It might explain how gravity recharges photons with negentropy and restores their higher energy in the cosmic energy cycle.
Another article on quantum effects and gravity