Great point, moreover toxins are substances produced by living organisms (rather than any poisonous substances). I would not be personally too concerned about our bodies being a danger to ourselves by way of excreting toxins. To be fair, however, what was probably meant earlier is "toxic chemicals". In that case there is obviously a serious problem, and mostly a foodborne one, e.g. heavy metals, dioxins, pesticides, PCBs, or perhaps even PFOA, PTFE, benzopyrene etc. In that context, the comment on a benefit of fasting in terms of toxic chemical removal might not be groundless? One would hope that at least some of the said chemicals would be released from cells destroyed through autophagy and then excreted with some nonzero probability. In reality though, even if some viable exit routes for those toxic chemical exist, unless one becomes a Himalayan monk for a decade, the proportion of cells "recycled" through autophagy is probably too small to significantly move the needle. Still, I guess every little helps!
Again, seems much more sensible to just try and prevent those harmful substances from entering our systems in the first place. This would bring us to the question: which foods are most likely to be contaminated (put another way: what are the foods with highest expected concentrations of toxic chemicals)?