Preheat oven to 350°F (175°C) and position the rack in the center. Line a 9x13-inch baking pan with parchment paper leaving an overhang on two sides, then lightly grease the parchment.
In a large bowl, whisk together the flour, cocoa powder, sugar, baking soda, and salt, breaking up any lumps in the cocoa. Create a well in the center for the wet ingredients.
In a medium bowl, whisk together the eggs, buttermilk, vegetable oil, and vanilla extract until smooth and well emulsified.
Pour the wet ingredients into the well of the dry ingredients and mix on low speed, then carefully stream in the boiling water while stirring continuously. Mix just until no streaks of flour remain — the batter will be thin.
Pour batter into the prepared pan, spread evenly, and tap on the counter to release air bubbles. Bake for 25–30 minutes until edges are set and a toothpick inserted in the center comes out with just a few moist crumbs.
In a medium saucepan over medium heat, combine sweetened condensed milk, egg yolks, butter, and vanilla, stirring constantly for 8–10 minutes until thickened and light caramel in color. Remove from heat and stir in coconut and pecans.
Immediately pour and spread the coconut-pecan topping evenly over the hot base using an offset spatula, sprinkle with chocolate chips if using, then return to the oven and bake 15–20 minutes until the topping is golden and set.
Cool on a wire rack for at least 1 hour, then refrigerate for 2–3 hours until fully chilled. Lift out using the parchment overhang, transfer to a cutting board, and cut into 24 bars, wiping the knife clean between cuts.