Preheat the oven to 350°F (175°C) and line two baking sheets with parchment paper.
Beat the softened butter and powdered sugar until smooth and creamy.
Mix in the vanilla extract.
Add the flour and salt and mix just until a soft dough forms.
Scoop the dough into 24 portions and roll each into a ball.
Place the dough balls on the prepared baking sheets and flatten them gently.
Bake for 10–13 minutes, or until the edges are lightly golden.
Cool the cookies on the baking sheets for several minutes, then transfer them to a wire rack.
Melt the caramel candies with the heavy cream over low heat, stirring until smooth.
Allow the caramel to cool slightly, then spread it over the cooled cookies.
Refrigerate the caramel-topped cookies for 15–20 minutes.
Melt the chocolate carefully in short microwave intervals, stirring frequently.
Stir in the optional coconut oil or shortening.
Spoon or drizzle the chocolate over the caramel layer.
Sprinkle with flaky sea salt if desired.
Refrigerate until the chocolate is firm.
Serve and store leftovers in an airtight container.