From what I've been learning from Tim Spector, the problem is as much the really atrocious impact on gut bacteria of the things the food industry uses to make it cheaper to produce things - so thickeners, stabilisers, monodiglyerides, preservatives and some acids, as well as sugar. They've basically discovered that the gut is like a new organ or maybe a second brain - they're only just beginning to uncover how incredibly important it is for mental (!) and physical health and how fucked we all are with a Western diet (they don't even know that all of the damage is reversible), and how absolutely corrupt and unethical the food industry is.
It's been a real shock to discover that the foods I considered 'healthy' are not, at all, if they have any of those industrial additives in. I've cooked from scratch for years using food that I'd assumed was pretty healthy - but all the things I use that aren't actual vegetables or simple grains, pasta etc - are awful. The whole seeded bread I've been buying - awful. Mission wraps - awful. The stockpot - awful. The vegan greek yoghurt and oat milk - awful. It's bollocks, I'm quite shaken. On the other hand, things without those additives can be much less crap than you might think - eg baked beans.
Sorry for long and slightly off-topic post. Short answer is: turn the packet over and look at the additives. There'll be some brands that are ok, some that are shit, and others that are shitter, and it's not always obvious which is which.