  Of the two solar lines, K I $D_1$ and $D_2$, almost all attention so far has
been devoted to the $D_1$ line, as $D_2$ is severely affected by an O$_2$
atmospheric band. This, however, makes the latter appealing for balloon and
space observations from above (most of) the Earth's atmosphere. We estimate the
residual effect of the O$_2$ band on the K I $D_2$ line at altitudes typical
for stratospheric balloons. Our aim is to study the feasibility of observing
the 770 nm window. Specifically, this paper serves as a preparation for the
third flight of the Sunrise balloon-borne observatory. The results indicate
that the absorption by O$_2$ is still present, albeit much weaker, at the
expected balloon altitude. We applied the obtained O$_2$ transmittance to K I
$D_2$ synthetic polarimetric spectra and found that in the absence of
line-of-sight motions, the residual O$_2$ has a negligible effect on the K I
$D_2$ line. On the other hand, for Doppler-shifted K I $D_2$ data, the residual
O$_2$ might alter the shape of the Stokes profiles. However, the residual O$_2$
absorption is sufficiently weak at stratospheric levels that it can be divided
out if appropriate measurements are made, something that is impossible at
ground level. Therefore, for the first time with Sunrise III, we will be able
to perform polarimetric observations of the K I $D_2$ line and, consequently,
we will have improved access to the thermodynamics and magnetic properties of
the upper photosphere from observations of the K I lines.
