Boiling the plant material with some vitamin C would prevent the oxidation from happening.
Very old plant material tends to have much more N-Oxides. Leaves also tend to have more than bark because they are less protected from oxidation. Powdered material would also be more likely to have more N-Oxides.
Heat and air movement are factors that greatly increase N-Oxide formation. When drying the freebase at the end of extraction, if heat and a fan are used, this can greatly increase N-Oxide formation.
There are actually techs out there that specifically use heat and a fan to create DMT N-Oxide because some people find it more pleasant than DMT. SWIM prefers DMT N-Oxide over DMT, but doesn’t like sticky texture of it. I think no one likes the sticky texture of it. It makes it almost impossible to measure doses. It sticks to everything. If it wasn’t for that, I think DMT N-Oxide would be very popular. It’s more friendly than DMT, and just as visual, but a total pain in the ass to scoop up and measure doses of it for smoking.