Is this allowable? It is fairly clear what is meant, and yet one cannot know for sure which object is being referred to each time "them" is used.
Sweets are bad for your teeth. If you eat them, it could damage them.
or even the other way around....
Sweets are bad for your teeth. You could damage them if you eat them.