First off, this is not true. There have always been health issues. Farming grains was able to feed many more people than hunting and gathering, enabling the development of civilization. But there was a trade off in health. In era when the average life expectancy was very low anyway, long term health consequences were minimized. Even so, human health declined when we switched to agriculture.
Yeah which is why we have so many people living beyond their 60’s 70’s and 80’s now...
We might could do some things better but there is something wrong with your premise of agriculture causing our health to decline.