Ie. If someone eats lots of bigmacs and then dies young, mcdonalds should have to pay a 'killer food' penalty.
If someone eats lots of apples and lives to 100, then the apple farmer should receive some kind of reward.
I would implement this by having some subset of the population volunteer their purchase data and health data, and have the regulator issue rewards and fines each year based on which food producers managed to make/keep their customers healthiest.
The end result should be that healthy foods are both profitable and cheap, and there is an incentive to reformulate foods to keep the eaters healthier.
That entirely bypasses the current problem of having food manufacturers trying to make their food look healthy while it actually isn't.