You shouldn't use aluminum foil with tomato/lemon/vinegar/brined foods or as "grilling packets" (direct fire/high heat) because of leaching risk.
There's no concern with using aluminum in most cases (with dry/non-acidic foods) but leaching is a real problem with acidic/salty/wet/high eat.
What is the leaching risk, though? If aluminum does get in your food, is it bad for you in a specific way, or is it more like iron?
I put aluminium foil over a bowl of pizza dough, as it grew the top touched the foil and in a few spots tiny holes appeared in the foil. I wonder if it was carbonic acid or what
Let's see if this is a quantitatively plausible concern.
https://en.wikipedia.org/wiki/Aluminium_chloride says orl-rat LD₅₀ of AlCl₃ is 380mg/kg, which is 20.2% aluminum by weight, so that's 77mg/kg of soluble aluminum ions. If this toxicity is due to soluble aluminum ions (rather than, say, acidity), and rats and humans are about equally sensitive to aluminum toxicity, you'd need about 3.8g of aluminum to kill a 50kg human, the ionized equivalent of 1.42mℓ of aluminum metal (at 2.71g/cc). That's 1420cm² of 10μm aluminum foil completely dissolved in the food.
Presumably you would get significant toxic effects well before reaching the lethal dose, so it would be wise to avoid exposures larger than a few tens of cm² of aluminum foil completely dissolved in your food. So it seems like the concern at least passes the first smoke test of plausibility: the total amount of aluminum present in a "grilling packet" is at least sufficient to worry about.
(Fortunately, aluminum rapidly becomes inert in the body, so we don't have to be concerned about gradual poisoning the way we do with lead and arsenic.)
The crucial question, then, is how fast the foil corrodes under cooking conditions! If it corrodes (and migrates into the food) at a micron or more per hour, then this could be a serious concern. But, if the corrosion rate is more like microns per month or microns per year, the dose wouldn't be high enough to worry about.
The fact that https://en.wikipedia.org/wiki/Aluminium_toxicity redirects to https://en.wikipedia.org/wiki/Aluminium_toxicity_in_people_o... suggests that this is at least not a recognized concern.