These are not failures of the free market. The growth of junk food can be attributed in large part to corn subsidies.
Now, if you attribute the success of agriculture to the government, why have all the collective farming systems failed completely? Why did the USSR have to import wheat from Kansas?
Modern wheat came from Norman Borlaug's research, which was funded by the Rockefeller Foundation - not a government project. He received a well-earned Nobel Peace Prize for it.
The Haber-Bosch process was developed at BASF, a private company, and was the first industrialized production of fertilizer.
> heavily-controlled agriculture
That's simply not true. A subsidy is not "control". The government does not direct what gets produced, who produces it, how it is produced, nor does it take the profits.
Modern food surplus is mainly thanks to the Green Revolution, thanks to advancements in fertilizers, pesticides, and machinery. A lot of that was government-lead.
On top of the heavily-controlled agriculture there is mostly a free market for consumer products (just needs to be regulated not to save costs by causing cancers), but that has innovated into making junk food cheaper than a healthy diet.