I'm sure there is some contribution of nutrient deficiency to obesity, nutrition is too complex to assume otherwise. However I'm not convinced it's the main driver, although the change in diet required to control intake usually improves nutrition as a side effect.
To be more concrete, the single correct part about "calories" is that the quantity matters, but the only practical road to keeping that under control is being naturally satiated, which is entirely about what you eat, everything else is a side effect of what. I know there are more complications when we are talking about people who grew up on very bad diets and have been obese all their entire lives - there's the psychological aspect and what the gut is used to that can take a long time to change - but putting that aside, the simplified extremes are:
1. You eat predominantly processed food based on carbs and sugar all day (90% of the isles in supermarkets, that also happen to be nutritionally empty but that's a another topic). You will always be hungry, because your body has been exposed to so much sugar that it never gets close to entering ketosis during the day, so as soon as you run out you immediately feel hungry. The only way to prevent overeating is pure will power, which is not sustainable for anyone, and extremely unpleasant.
2. You eat predominantly natural food, it has far higher fat and protein content, far less sugar, far less carbs. We are talking red meat, eggs, fish, milk, veg, nuts (lots of good fat). It's really hard to even intentionally over eat on these natural foods, and to eat too frequently, because it's so high in fat and protein and so low on carbs (relatively, it doesn't mean you can't have bread in your sandwich). Your body very easily enters ketosis between meals so you don't tend to get hungry easily outside of excessive exercise.
I'm a human being, I don't adhere to #2 strictly, but I try to make that my core diet, and the effects are really obvious. On the days I have some naughty cake or croissant or whatever, I notice how much hungrier I am all day, I just accept that, it's ok, I don't do it every day. Trying to control that hunger is futile and I get a taste of what it's like for all those poor obese people who unfortunately don't know this is the reason, I don't blame them, they are a product of their environment (food industry) and a lack of education.