This is an interesting angle. Next generation will pretty much be exposed to pollution by the moment they're born. Technically their kids will inherit a slightly mutated version already even though it might not yet be enough. Does our gene "remember" how much exposure it had accumulated from the previous generation? We often hear from the news how they found some individuals who were immune to certain diseases due to a specific genetic mutation. Your kids don't carry the exact DNA as yours since it's a combination between a father and a mother so it will always be a new mutation.
Does our gene "remember" how much exposure it had accumulated from the previous generation?
Not as DNA. The main thing that controls evolution is failure to reproduce. Life experiences have only a very short term effect on how DNA is packaged.
it will always be a new mutation
A "mutation" is not the same thing as a "permutation". The combination of DNA from two parents is not itself mutation.
Transgenerational inheritance is what this is technically called, and is a contentious topic about whether or not it exists in humans and to what degree. There's been studies from people who's grandparents have gone through famine and those grandchildren tend to be shorter or leaner than those who haven't, but AFAIK these are just associations and nothing causal has been found in humans to suggest what happens to you might affect your grandchildren. That being said, being exposed to pollution is not going to be great for your sperm or eggs.
And I know you are worried about what the next generation breathes, but consider that what you were exposed to was much worse, and what your parents were exposed to was worse still, and if your grandparents lived in cities they experienced awful pollution, second only to perhaps what your great grandparents may have been exposed to during the industrial revolution. Air quality has gotten better than it was in 1980 and much better than 1880, but there is still a long way to go to reset the damage of rampant consumer culture on our environment and health.
Also to your point on how mutation happens: its random and rarely beneficial. If you go out in the sun without sunscreen, that UV light penetrates your skin and encourages your skin cells to produce more melanin, but it could also damage your DNA, break a tumor suppressing gene, and give you skin cancer.
Your bodies DNA replication machinery also has an error rate which can be worked out, and you can extrapolate that to get a rate of mutation. Knowing this rate can give you an estimate of how long ago two species diverged based on the number of different bases when you line up their DNA sequences against eachother, for example.