In the apple sauce contaminations the apple sauce is always cinnamon flavored. When tested for various heavy metals, cinnamon usually has unsafe levels of heavy metal contamination, and lead is usually one of the metals: https://tamararubin.com/2024/12/six-cinnamon-products-chart/
There is widespread contamination in spices because the machinery that processes most spices is made of metal with lead. Some of the lead may be unintentional contamination, but lead is also used intentionally because it is cheap and useful. I believe it is useful for grinding, etc because when used in an alloy the metal doesn't wear down as easily.
So if you want to replicate those apple sauce products without heavy metal you would need to buy cinnamon sticks and grate them yourself.