What keeps an aircraft engine from flaming out at high altitude?
The oxygen level at high altitude is the same as at sea level, namely 20.95%. What is lower is the oxygen pressure.

To avoid flameout, pilots must avoid to throttle the engine down too much, so a minimum pressure in the combustors can be maintained.

Designers can increase the altitude performance by building longer combustors. The speed of ignition is pressure dependent, and with lower pressure it takes longer for the fuel-air-mixture to ignite. More length allows more mixing and leaves the mixture more time to react. Also, they can add flame holders which leave pockets of burning fuel close to the injection nozzles, so the mixture is heated more rapidly and ignites more reliably. Normally, flame holders create drag and are reduced to the minimum necessary.