I love these sorts of thing
Since I work directly in the supply chain of all the main manufacturers of any note I see the quality of the ingredients they buy.
Heinz stuff is still top of the league basically. M&S also.
What people get confused at, especially the OP is that their taste and what they eat influences how they perceive a product.
We have lots of old products in storage that are used to demonstrate the development.
Eg the rather popular childrens breakfast cereal that turns the milk chocolatey. The original recipe if you taste it now tastes just like sugar, far far too sweet. Sensory analysis from back then said it was "about right".
Now the current one is "about right" and the older ones are far too sweet. But thats been done in steps.
I guess we should can all that expensive development all the manufacturers do, along with the sensory panels etc and employ shelf stackers in product development
TBH just buy what you like, if it suits your taste then buy that.
I mean in plenty of cases the brands are demonstratably better quality but if you prefer asda smart price buy that. Just watch the ingredients for some products.
The other thing to consider is that its constantly evolving, its not fixed and recipes are constantly tweaked, very few survive the test of time.
Some make a song and dance about changes which often backfire, most just do it and having already sensory tested via panels etc, just wait to see if anyone actually notices.
I always used to be a heinz ketchup person, but a want to reduce sugar meant I switched to tesco version and it took me 3 months or so to get that taste profile embedded in my brain as how it should taste.
I now buy the polish hot chili version from Tesco, although its far from hot to my tastebuds.
The "same factory" stuff is derp, just like comparing a bottom of the range 720p tv to a 4k oled because they are made in the same factory.
Same factory different recipe = not the same.