How important is glucose flattening?

That completely ignores the difference in resting metabolism between a couch potato and someone who is only moderately active. Yes, walking or treadmilling for 30 minutes will offset only a few nuts.

But the elevation in your basal metabolic rate for the other 23-1/2 hours due to regular exercise will do the “heavy lifting” of burning a lot more calories. And, as you say, altering what your body does with the calories you do take in.

It is a truism in sports nutrition that you can’t out-exercise a bad diet. But it is also true that regular exercise goes a long way to converting an OK diet into a good one. And within reason, more exercise tends to result in less desire to eat crap. Eating less crap also makes exercising more easier.

There are a LOT of mutually reinforcing feedback loops for good or ill in human behavior, nutrition, and conditioning. Any time somebody trots out the “calories in minus calories out = weight gain (loss)” argument they’ve demonstrated they’re looking at the foam in the bathwater, not the baby or even all the water.