Is it safe to boil sweetened condensed milk in the can to make duche de leche?
Yes, it is perfectly safe. Nearly all if not all canned foods sold commercially  have been processed in retorts (industrial pressure cookers) to kill microrganisms
The metal from the can is not going to leach into the food contained in it