What happens to a photon when it loses all its energy? My understanding of Compton Scattering is that when a photon collides with a free electron, it will lose energy to the electron, and this loss of energy translates to an increase in the wavelength/reduction in frequency/red shift.
If my understanding is correct, then what happens to a photon when it loses all its energy? Does the wavelength become infinite and its frequency reduces to zero? Does it become dark and undetectable?
 A: It may help your thinking to distinguish the term "photon" from the term "light pulse". The concept "photon" comes from quantum physics, and it refers to the degree of excitation of of the electromagnetic field at some given frequency. This means that a photon cannot change frequency, by definition. But in a process such as Compton scattering, a photon of one frequency vanishes and a photon of another frequency is formed. These are two different photons.
Adopting this (somewhat more careful) terminology, your question becomes, "can one have a photon of zero energy"? Such a photon would have zero frequency and infinite wavelength. So the question becomes "are there any such modes of the electromagnetic field?" That is, are there modes of infinite wavelength? The answer to that is unknown since we do not know if the universe itself is infinite or even what such a concept could mean. For a more precise discussion it is better not to try to talk about infinity itself, but talk about limits. So we say that in the limit as one considers modes of longer and longer wavelength, the photon energy tends to zero. Another way to say the same thing is to assert that the lower bound of what energy a photon might in principle have is not known to be above zero.
A: 
What happens to a photon when it loses all its energy?

A photon is by definition a quantum mechanical particle of mass zero, spin one, and energy equal to $hν$   where $ν$ is the frequency of the classical electromagnetic wave that a lot of photons of that energy will build up. It follows special relativity rules, i.e. it is described by a four-vector and all its interactions follow four vector algebra.
Can an electron disappear? Because of lepton number conservation in annihilating with a positron it disappears, and also weak interactions have paths where the lepton number is carried by the electron neutrino so it could disappear as an electron.
Can a photon disappear?
Yes .A photon with the energy difference between two atomic, molecular  or lattice levels could interact and disappear the energy it carries going to raising the energy level of the bound system. So the specific photon disappears because only energy and momentum conservation rules need be followed, it has no distinguishing quantum number to keep count of.
In Compton scattering

the energy and momentum of the photon is transferred to the electron and a new photon of lower energy appears. It cannot be completely absorbed because energy and momentum conservation would be violated, as the answer of  @Chris says.
A: When a photon interacts with an atom, three things can happen:

*

*elastic scattering, like mirror reflection, this is Rayleigh scattering, the photon keeps its energy and phase, and changes angle

https://en.wikipedia.org/wiki/Rayleigh_scattering


*inelastic scattering (your example, Compton scattering), the photon gives part of its energy to the absorbing electron, changes angle, but the photon keeps existing (does not cease to exist)

https://en.wikipedia.org/wiki/Compton_scattering


*absorption, the photon gives all its energy to the absorbing atom/electron system, and the photon ceases to exist

https://en.wikipedia.org/wiki/Absorption_(electromagnetic_radiation)
You are asking in the comments, whether it is possible that there are extremely low energy photons around us, we just can't detect them. The answer is probably yes. The main reason is, there are technical limitations to what we can detect.

the lowest energy detectors I am familiar with is at the CMB microwave background energy of ~ 3KkB, which corresponds to a wavelength of about 5 mm, or a frequency of around 60 GHz.
shows detection of photons at around 200 MHz (corresponding to a wavelength of 10 m) that are stored in a resonator, using coupling to a superconducting qubit similar to the systems mentioned by Daniel Sank in the comments. The natural frequency of the qubit is in the GHz, so they had to do some clever designing to make it sensitive to such a lower frequency.

https://physics.stackexchange.com/questions/247505/the-lightest-photon-ever-detected#:~:text=The%20limit%20to%20the%20lowest,for%20example%20with%20this%20chart).
Please note that you are saying that these low energy photons are losing energy by Compton scattering, but more probably, they lost their energies due to space expansion itself, just like in the case of the CMB around us.

The photons that existed at the time of photon decoupling have been propagating ever since, though growing fainter and less energetic, since the expansion of space causes their wavelength to increase over time (and wavelength is inversely proportional to energy according to Planck's relation).

https://en.wikipedia.org/wiki/Cosmic_microwave_background
So the answer to your question is, that there are probably photons around us that we cannot even detect because their frequency is so low, but the reason they exist around us is probably not Compton scattering but rather space expansion itself.
A: A photon cannot lose all of its energy by Compton scattering, as that would violate conservation of four-momentum. Imagine a photon with four-momentum $(p,\vec p)$ gives all of its energy (and thus all its momentum) to an electron with four-momentum $(m,0)$, in $c=1$ units. Then by conservation of four-momentum, the new four-momentum of the electron would be $(m+p,\vec p)$. But computing the mass corresponding to that four-momentum gives $m=\sqrt{m^2+2mp} > m$. Since the mass of an electron is fixed, this is a contradiction and so cannot occur.
A: Given any photon, there is a frame of reference where it has any energy you like. Arbitrarily high or low. There may be a wavelength so long and an energy so low that you cannot detect it. But it is still a photon.
If it has an arbitrarily low energy and momentum and it scatters off a particle at rest in your frame, it will not deflect the particle very much. But a particle running upstream into it will see it as Doppler shifted to a shorter wavelength. There is a particle speed that will give the photon an arbitrarily short wavelength and high energy.
A frame of reference where the photon has $0$ energy is one where it has $0$ frequency. That is, at any point the phase is unchanging. This means the frame of reference would have to travel as fast as the photon. Since the photon travels at the speed of light, this is impossible. There is no such frame of reference.

Another place where this is interesting is in a gravitational well. Time runs slower on the surface of a planet. An observer on the planet will see a photon as having a high frequency and a short wavelength.
If the photon travels upward, any observer it may encounter at the top of a tower will have a faster clock. That observer will measure the photon as having a lower frequency and longer wavelength.
For a black hole, this effect becomes extreme. The closer you get to the event horizon, the harder it is to maintain a frame of reference like a planetary surface. A photon emitted on such an extremely high gravity planet will be measured to have the same frequency it would on a lower gravity planet. However, an observer far from the planet will see time as running extremely slowly on the high gravity planet. He would see the photon as extremely red shifted if it climbed up to him.
At the event horizon, it is impossible to maintain a planet like reference frame. Time
would stop. Such a photon would be infinitely red shifted and have $0$ energy. It would also take an infinitely long time to arrive, traveling as it would through slow-time regions.
Inside the event horizon, all trajectories lead to the singularity at the center. The photon would never reach the event horizon.
