Stand at any center point along the axis of the pipe where the temperature is $T$. Assume that you can obtain $h_i$, the internal convection heat transfer coefficient, $k$ the thermal conductivity of the pipe with thickness $w$, and $h_o$ the external convection heat transfer coefficient. Assume an external temperature of $T_\infty$. The heat transfer rate $\dot{q}$ is defined by these equations with $A_i$ as the internal wall area and $A_o$ as the external wall area:
$$ \dot{q} = U A_i (T - T_\infty) $$
$$ U^{-1} = h_i^{-1} + wk^{-1} + A_i(h_o A_o)^{-1} $$
The term $U$ is the overall heat transfer coefficient. In this example, $U$ is based on the internal area of the pipe. You can make use of the information at this link to change between inner or outer area (as well as to include fouling). Note that for cylinders, $A_i/A_o = R_i/R_o$, the ratio of inner to outer tube radius.
This gives you the heat transfer rate from the center of the pipe to the ambient air. The value of $T$ is a function of distance $z$ along the pipe. The energy balance for the gas flow through an infinitesimally thick circular plane at $z$ is
$$ \dot{m}\tilde{C}_p\ dT = -d\dot{q} = U\ 2\pi R_i\ dz\ (T_\infty - T)$$
where $\dot{m}$ is the mass flow, $\tilde{C}_p$ is the specific heat capacity, and $dT$ is the temperature change of the gas as it goes through the plane at $z$. Note that if $T > T_\infty$ the gas temperature decreases as it passes through the plane as expected.
A useful transformation at this point is to define $\theta = (T - T_o) / (T_\infty - T_o)$ where $T_o$ is the temperature of the gas entering the tube and to define $Z = z/L$ where $L$ is the pipe length. With this, the governing equation becomes
$$ d\theta = \beta \left(1 - \theta\right) dZ $$
$$ \beta = \frac{2\pi R_i L U}{\dot{m}\tilde{C}_p} $$
Note that when $T_o > T_\infty$, as we move from the inlet to the outlet, $z$ increases and $\theta$ goes from 0 to 1 (increasing).
In practice, $U$ may depend on $z$ and $\tilde{C}_p$ may depend on $T$. A first approximation will neglect these variations. The dimensionless solution is
$$ \theta = 1 - \exp\left( -\beta Z \right) $$
A plot of $\theta$ versus $Z$ for a value $\beta = 1$ is shown below. By example, at a location 50% down the pipe, we obtain $\theta \approx 0.4$, meaning $T \approx 0.4(T_\infty - T_o) + T_o$. When the gas enters at 100$^o$C and the ambient is 20$^o$C, the gas would be 52$^o$C at the 50% position down the pipe. The position $Z = 1$ is the end of the pipe, where $\theta \approx 0.63$.
Correlations for $h$ will give first approximations, the value of $h_o$ is dependent on radial position, and the dependence of $k$ and $\tilde{C}_p$ on temperature may not be negligible. The simplest approach for quick and dirty confidence is to define $\theta_{limit}$ in your system, estimate the range of $\beta$ you can expect, and use an interactive graphing tool such as GeoGebra to slide through that $\beta$ value to see whether the $\theta_{limit}$ is ever exceeded along the pipe for the estimated ranges. The maximum $\theta$ is at $Z = 1$ (the end of the tube). So your first problem is simply to determine whether you exceed this criterion:
$$ \beta > -\ln\left(1 - \theta_{limit}\right) $$
Essentially, you want to stay below a limiting value of the ratio of heat transfer from the pipe to enthalpy flow of gas through the pipe, either by increasing the mass flow of gas through the pipe or by reducing the air flow over the tubes.
After that, you may also want to analyze whether the sides of the tubes that are upstream in the external air flow could be subject to cool below your limit because the local $h_o$ is potentially higher than you set in your first estimate using an average $h_o$. You can walk backwards along the tube from its exit point because that is where the "cool spots" will most likely first appear.
