Preheat oven to 325°F (170°C). Line a 9-inch square baking pan with foil, letting excess extend over sides of pan; spray foil with cooking spray.
For brownie: In the top of a double boiler, heat chocolate and butter over simmering water, whisking occasionally, until melted and smooth. Turn off heat, and whisk in confectioners’ sugar and brown sugar until well combined, 1 to 2 minutes. (Mixture will not be completely smooth.) Remove from heat; let cool for 3 minutes.
In a medium bowl, whisk together flour, cocoa, kosher salt, and baking powder.
Gradually add eggs to chocolate mixture, whisking until combined. Whisk in vanilla. Fold in flour mixture just until combined. Spread batter into prepared pan.
Bake until a wooden pick inserted in center comes out with a few moist crumbs or an instant-read thermometer inserted in center registers 200°F (93°C), 15 to 20 minutes. Let cool completely in pan on a wire rack.
For caramel: In a medium heavy-bottomed saucepan, whisk together condensed milk, brown sugar, cream, corn syrup, butter, and kosher salt. Bring to a boil over medium heat, whisking frequently, until thickened, smooth, and shiny and an instant-read thermometer registers 234°F (112°C) to 240°F (116°C) for soft-ball stage, about 12 minutes. Remove from heat, and whisk in vanilla. Pour hot caramel onto cooled brownie, spreading smooth. Let cool completely.
For ganache: In a medium bowl, add chocolate.
In a medium saucepan, heat cream and corn syrup over medium-low heat until steaming. (Do not boil.)
Pour hot cream mixture onto chocolate; let stand for 2 to 3 minutes. Starting in center of bowl, slowly stir in small circles with a rubber spatula until well combined. Stir in butter until melted and combined. Pour ganache onto cooled caramel, spreading smooth. Garnish with sea salt, if desired. Refrigerate until ganache is set, about 30 minutes.
Using excess foil as handles, remove from pan, and cut into bars. Refrigerate in an airtight container for up to 3 days.