In a medium saucepan, combine the sugar, cornstarch, and salt. Gradually stir in the milk over medium heat and add the chocolate, whisking often until the chocolate has melted and the milk is hot and just about to simmer, about 5 minutes. Add the dulce de leche and whisk until it melts, 1 to 2 minutes. Remove the pan from the heat.
In a large bowl, beat the egg yolks until blended, about 30 seconds. Whisk about 1/2 cup of the hot milk-chocolate mixture into the yolks and then beat in another 1/2 cup. Slowly whisk in the remaining hot liquid and then pour the mixture back into the pan. Heat the mixture over medium to medium-high heat, stirring constantly, until it reaches 180°F and just begins to thicken; it will look like it’s about to boil. Remove from the heat and whisk in the evaporated milk and cream, whisking until the mixture begins to cool. Strain to remove any cooked pieces of egg and refrigerate until it’s colder than about 60°F, at least 2 hours or as long as 24 hours, stirring occasionally.
Add the pecans, if using, and freeze the mixture in an ice-cream machine (following the maker’s instructions) until the ice cream is very thick and cold. Transfer to a resealable plastic or stainless-steel container and freeze until it’s firm enough to scoop, at least 3 hours.