Considering speed of light c is constant in vacuum (space) I skip all doppler effect speculation, referring only to a frame at speed c following the one photon in question. As I see it light can not accelerate or decelerate (in vacuum), only bend as follows due to gravity.

A photon is "flying" at its pace c past numerous planets, suns and galaxies. one particular sun is coming up slightly beneath its direction along a line d. The photons trajectory goes beneath d in a slightly curved line l at a perpendicular distance (delta)r to d at a distance r from the suns midpoint. Closest r is skimming the suns surface at its radius distance R. The dragging force toward the suns mid point F=4*h/(pi*s^2) where h is the standard gravitation parameter of this sun. s is the distance between the photon and suns midpoint. Assuming l linear (delta)r=0 and r*sin(alpha)=0 give values better than 4 number accuracy and thereby s^2=l^2+r^2.Gained gravitation induced speed in perpendicular direction v=a*t=INT(-inf to 0)4*h/(pi*(l^3+r^2))dt. Since speed in l direction is c we get time t=l/c, giving Integral 4*h/(pi*((t*c)^2+r^2))) dt and finally v=pi/2*(4*h/(pi*c*r)) =2*h/(c*r) =vOf the original "amplitudes" part are stretched (c-v)/(lambda) and part v/(lambda) are by length in perpendicular direction. The angle to which the photon trajectory l has "curved" is(alpha)=2*arcsin(v/(c-v))for the whole "flyby", minus infinity to 0 to plus infinity =2. Color change f-(delta)f frequency is(delta)f=-2*f*v/c.The redshift color change is coupled to h and r not original color. Redshiftz=2*v/cand energy loss (delta)E=(delta)f*hi, where hi is Planck constant. Wavelength elongation is wavelength dependent

(delta)(lanbda)=(lambda)*c/(c-2*v)-(lambda) =(lambda)*(c/(c-2*v)-1)The photon keep flying past suns galaxies and smaller till after some 13 billion years it is not even red anymore, it is just a "background" of its radiant youth, and eventually c/(lambda)-(SIGMA)(delta)f=0

August 20.2022 Timo Moilanen

PS! The universe do not expand (at least no so much)

Aug 23. The difference compared to a particle (probe) is that I do not allow the photon to accelerate (blueshift) but use all work a*s to perpendicular acceleration instead of just the sin(beta) part, (beta)=angle between trajectory l and direction to sun midpoint. This about doubles the bending (alpha) and avoids charging the photon "in mid flight", and also avoid decelerating after passing (redshift). Inertia free photon, all Work gone to deflection. And energy not relative to v^2 but v/c*hi.

Aug24. Sorry about my mess with color an frequency, here f,(alpha) for the apparent (not refracted) bent light.

observed wavelength =original wavelength *c/(c-2v)Edit.4.9-22 The potential v need to be = or > than (lambda) at the flyby because the photon can not give other than n*hi quants of energy, otherwise it flyes by "unharmed". This will lead to shattering of long wavelength light to rings that are bent less les tan the shorter. The rings are not monochromatic but one (lambda) different in color than the next ring and so on. These rings are also narrow (plumes) because the distance r collect these 1.2.3..n bent photons as the distance shortens to the mass.

observed frequency = original frequency *(c-2v)/c