Line an 8-inch square pan with parchment, leaving overhang for easy lifting.
Toast the chopped pecans in a dry skillet over medium heat until fragrant, 3–5 minutes. Cool.
Melt chocolate chips, condensed milk, and butter in a saucepan over low heat, stirring until silky.
Stir in vanilla and fine sea salt. Fold in about half of the toasted pecans.
Spread roughly half the fudge mixture into the lined pan. Chill 5–10 minutes to slightly set.
Melt caramels with heavy cream in a small saucepan over low heat, stirring until smooth and pourable.
Pour caramel over the first fudge layer. Sprinkle on the remaining pecans and press gently.
Spread the remaining fudge over the caramel to cover. Smooth the top. Sprinkle flaky salt if using.
Chill until firm, about 2 hours, then lift out by the parchment and place on a cutting board.
Cut into small squares with a warm knife. Wipe the blade between cuts for clean edges.