How can the temperature in a column of gas be uniform, if kinetic energy increases when gas molecules go down? I cannot wrap my head around a supposed temperature gradient versus total energy gradient paradox for thermodynamic equilibrium of (open space ) gas  in gravitational field.
For simplicity, consider ideal monoatomic gas like ideal argon. There is supposed the zero temperature gradient in equilibrium. But how to deal with the constant total energy and altitude dependent kinetic energy of molecules between collisions with nonzero vertical velocity projection?
$$\frac{d(E_\mathrm{k} + E_\mathrm{p})}{\mathrm{d}h} = \frac{\mathrm{d}(\frac 12 mv^2 + mgh)}{\mathrm{d}h} = 0$$
With reversible exchange $E_\mathrm{k}$ and $E_\mathrm{p}$ and for the statistical means, it should be like
$$\frac{\mathrm{d}(\frac 32k_\mathrm{B}T + mgh)}{\mathrm{d}h}=0$$
In case of zero temperature gradient, how comes descending molecules do not convert their potential energy to kinetic one and inject thermal energy to lower layers (and vice versa)? How comes it does not cause temperature gradient until the total mean molecular energy gradient is zero?
I feel I am missing something and that density gradient somehow compensates the effect of molecular energy gradient at zero temperature gradient, but I do not see how.

A detailed kinetic theory analysis is very probably above my abilities. I have discussed in in chats in both CH and PH SE sites at:
CH SE: density-gradient-vs-entropy-of-mixing
chat discussion-between-poutnik-and-theorist
and
PH SE: what-is-the-reason-of-dt-dh-0-in-the-gas-column
chat discussion-between-poutnik-and-giorgiop
I have also searched site:stackexchange.com for related Q/A about gas equilibrium and gravitationalfield, but I have not found a topic addressing it unless I have missed it.
PH Se: in-a-gravitational-field-will-the-temperature-of-an-ideal-gas-will-be-lower-at considers Earth atmopsphere, which is not at equilibrium ( I have meteorological background from my days of an enlisted airfield meteorologist so I am aware of dry-adiabatic gradient 0.0098 K/m.)
 A: In equilibrium, there's no temperature gradient, no kinetic energy gradient, and no heat transfer. But like most results in kinetic theory, it's unintuitive unless you follow what each particle in detail.
First, let's explain why there's no kinetic energy gradient. Think about the particles that start low and end up high. Since it costs energy to go up, doesn't that mean that the particles that end up high should be moving slower? No, because particles that were originally moving slowly don't have enough energy to get up high in the first place. The only particles that get high are those that got an unusually high kinetic energy through a lucky collision. As they go up, they lose that extra kinetic energy to potential energy, arriving at the top with the typical amount of kinetic energy.
(Of course, in reality there's some distribution of kinetic energies, but this logic holds for each part of the distribution. Suppose you had some mix of particles with kinetic energy $0$, $1$, $2$, $3$, ... at the bottom. The particles with kinetic energy $0$ don't make it up. The particles with kinetic energy $1$ arrive with kinetic energy $0$. If you work through it quantitatively, you end up with exactly the same distribution.)
Second, let's explain why there's no heat flow. The point is that the density at each level stays the same in equilibrium. The particles falling from the "high" level to the "low" level pick up a lot of kinetic energy, so they arrive at the "low" level with more kinetic energy than most of the particles already there. But at the same time, particles are leaving the "low" level to go up to the "high" level, and as we just argued, the only particles that can do this are the most energetic ones. So in equilibrium, you predominantly have particles with unusually high total energy going in each direction, but since the flow of particles balances, there is no net heat flow from up to down.
By the way, as you suspected, the existence of a density gradient is essential to maintain equilibrium. That's because all of the particles at the high level can fall to the low level, but only the highest energy particles at the low level can go up to the high level. For the rates to balance, there need to be more particles at the low level, which is precisely what happens in equilibrium.
A: Too long for a comment:
Since I've discussed this at length with Poutnik, I thought it might be helpful if I offered this summary of his question for other readers (he can of course correct me if he thinks I've gotten this wrong).
As I understand it, he's essentially saying this:
Imagine you have a column of gas in a container at thermal equilibrium. As the gas particles move towards the bottom, they lose gravitational PE, and thus must gain KE.  Conversely, those that move upwards gain gravitational PE and thus must lose KE. He concludes that, if a gravitational field is present, a column of air in a container at thermal equilibrium will have a permanent vertical thermal gradient (warmer at the bottom, cooler at the top) because the average speed of the gas molecules decreases with height.
I've told Poutnik I don't think a permanent thermal gradient is possible in an equilibrium system, because it would lead to a 2nd law violation:  If you had a permanent warm end and a permanent cold end, and immersed the container in a heat bath of uniform temperature*, heat would continuously flow from the hot end into the bath, and from the bath into the cold end.  You could use both of these heat flows to do work. Thus you would have perpetual motion machine of the 2nd kind.
[*You could make the heat bath from a solid material, to preclude the possibility that the heat bath would also have a thermal gradient.]
So I instead view this as akin to a Maxwell's demon https://en.wikipedia.org/wiki/Maxwell%27s_demon).  Maxwell's demon is a nice thought experiment, since it creates a paradox to which you know there must be some resolution, since the 2nd law can't be violated.  Pounik's argument also seems to create a nice paradox for which there must be some resolution, and for the same reason—that the 2nd law can't be violated.
I suspect the resolution is that the ascending and descending gas molecules redistribute their KE's as they ascend and descend, thus keeping a thermal gradient from forming.  But I think Poutnik is looking for a more formal demonstration of this.
A: Temperature is a coefficient in Boltzmann (canonical) distribution:
$$p(p,q)\propto e^{-\frac{H(p,q)}{k_B T}}.$$
It can be shown from this that temperature is the average energy per degree of freedom (see Equipartition theorem), that is, for every atom in a monoatomic gas we expect
$$\langle K\rangle + \langle V\rangle=\left\langle\frac{m\mathbf{v}^2}{2}\right\rangle + mg\langle z\rangle=\frac{3k_B T}{2}.$$

In case of zero temperature gradient, how comes descending molecules do not convert their potential energy to kinetic one and inject thermal energy to lower layers (and vice versa)? How comes it does not cause temperature gradient until the total mean molecular energy gradient is zero?

The reasoning here seems to imply that temperature is average kinetic energy of an atom rather than its average total energy. This is not the case: as the atoms descend or rise, their kinetic energy changes, but their average total energy remains the same, hence, no temperature gradient to speak about.
Remark:  existence of a temperature gradient would also mean that the system is not in equilibrium and cannot be described by Boltzmann distribution and other tools of thermodynamics and statistical phsyics.
