To "prove" it's mostly about calories in/out, Prof Marc Haub lost 27 pounds in 10 weeks with more than 2/3 of his diet being UPFs in the form of Twinkies, Little Debbie Snacks, Doritos, Sugary Cereals and Oreos etc. He's got more details on his blog link (sorry, can't find it). Crucially, he (claims) his exercise was the same, which was moderate amounts of walking, and dealing with obese students.
A couple of points to add to this article :
1. some people have genetic traits for storing fat, which manifests in modern humans under certain conditions: next to zero exercise, mostly UPF diet, lack of fiber, lack of sunlight, chronic stress. Ancient hunter/gatherers are barely getting enough calories, men walking on average 15k/day, and getting 100+ grams of fiber, so no, their propensity to store fat won't manifest, but the genes to store fat is a survival advantage for them. Daniel Lieberman explains this in his books "Exercised..." and "The story of the human body".
2. Caloric expenditure differences in subjects' fidget factor(NEAT), from lowest to highest, is around 350 calories per day, which adds up to about 35 pounds a year.
3. studies on humans overfed by 1000 calories a day show large difference between min/max weight gain. When twins are subjects, the fat amount/type gained is very close, suggesting strong genetic component.
4. I would expect UPF companies to promote calories in/out theory, that way they can, like Coca Cola, make claims that their food can be part of a well balanced diet when consumed in "appropriate" amounts.