https://en.wikipedia.org/wiki/Infectobesity
the cure you suggest fails on 95% of obese people, though like many pseudoscientific quack cures, it does appear to work at first, and actually does work in a few cases
the implied etiology doesn't hold up to the most casual critical thinking: resting and eating have been part of every human life since long before there were humans, but the obesity pandemic is only 50 years old. this is like attributing deaths from dengue to "bleeding" and recommending that people bleed less
diet and exercise is clearly the proximate cause of obesity, but the question is what drives diet and exercise, and what changed so suddenly?
The “sudden” change is easy to see in the supermarket. Most people don’t shop at Whole Foods, Sprouts, or Central market. Go to Walmart and admire all of the densely caloric colorful boxed foods.
Did you know young people actually use door dash/uber to get their fast food? It’s wild. So not even expending a few calories to get it but also wasting a bunch of cash.
The drive to eat and what is strongly influenced by gut biome. Fecal transplants have created new food preferences.
Even saying diet and exercise are the proximate cause may be an oversimplication. We know that the same level of activity and food intake can produce different results in different people. That doesn't violate thermodynamics. There are caloric expenditures that are not measured in such studies, like incomplete digestion and thermal regulation.
People shouldn't eat what they are eating, and they should have alternatives that are healthy for them (which also varies by person, but is almost never equal parts transfat and fructose with a petroleum based dye to make it pretty and to cut the sweetness, enough salt to cure a whole pig).
I've been around people who made legitimate good-faith efforts to diet and eat "healthy", but have no idea that "just a bowl of rice to go with it" and "I need my afternoon milk tea" and maybe another snack are like 500+ extra calories each day, that hardly even leave you full.
An accepted rule of nutrition/diet/physiology is that an excess of 3,500 calories will lead to a gain of 1lb of fat.
The basal metabolic rate for an adult in the United States is 1,731 calories (numbers based on averages returned in google, 38.1 years old, 5’11, 181 lbs).
So 1,731 calories for a sedentary person is really easy to surpass. If they surpass that by a few hundred calories a day then they’ll gain a pound every 10 days(ish). After ballooning up they can jump on the ozempic train and lose weight. Or just stay obese.
If you don’t know anyone on ozempic then I’ll share - the weight loss appears mostly due to discomfort. Eating what they used to do becomes very uncomfortable due to abdominal pain/nausea and constipation. So they calorie restrict and they start to lose weight because they’re below their BMR.
But again the calorie counting is an oversimplication as mentioned in other posts. Elegantly simple, and so attractive. Caloric restriction will always work in the absence of the endocrine issues you mention. And in the absence of other issues we haven't discovered or don't understand yet. The vast majority of hypothyroidism is due to autoimmune related inflammation (Hashimoto's). The normal cause for that is childbirth related immune response. But plenty of other autoimmune diseases are virally triggered, quite possibly even diabetes. Combining that with the way gut biome impacts appetite and processing efficiency, we can't just pretend telling people to eat less and better and exercise will matter no matter how hard we work on education. Ozempic is a bandaid that rich people will use and will slow down discovery of all the multitudes of ways modern life has conspired to cause obesity.
This has nothing to do with "Diet and exercise don't work" and everything to do with the fact that every single fat person KNOWS they are fat, already KNOWS diet and exercise are the solution, and has likely already tried diet and exercise in some way and couldn't manage it. People usually get fat because eating calorie dense foods feels good and people are desperate for anything to feel good because the average person has spent the last 6 decades being squeezed for every last drop of wealth by the ownership class, which it turns out is a very stressful experience.
Diet and exercise are extremely difficult to tack onto your existing life if you aren't already predisposed to it, and if you are already predisposed to it, you probably aren't fat because you have a healthy diet and exercise!
My mom's family grew up eating fried lard(!) as a regular food. Not a single one of them got overweight because they had regular exercise when they played with friends or did chores like tending the garden or worked the potato fields, and because they literally could not afford to eat enough lard to get fat
The reason that food insecure households are fat is not some magic bullet substance that we will be able to remove from our life, but because for a lot of Americans, you buy your groceries at dollar general or walmart and the frozen nuggets are cheaper than a pound of chicken thigh.