Preheat the oven to 350ºF. Spray a 12 X 17-inch rimmed baking sheet with nonstick cooking spray, line with parchment paper, and spray again. Set aside.
Spread the coconut on another rimmed baking sheet and toast in the oven until light brown and fragrant, 7 minutes. Set aside to cool.
Meanwhile, sift together the flour and baking powder and set aside. Melt the butter, bittersweet chocolate, unsweetened chocolate, salt, and cayenne, if so desired, together in a double boiler or in a heatproof bowl set over a saucepan of gently simmering water, stirring occasionally to blend. When completely melted and smooth, remove from the heat.
Put the eggs in the bowl of an electric mixer fitted with the whisk attachment and whisk at medium speed until frothy. With the machine running, add the sugar and continue to whisk until the mixture is pale yellow, thick, and doubled in volume, 8 minutes.
Add the vanilla and mix to incorporate. Turn the mixer speed to low, add the melted chocolate in a slow, steady stream, and whisk for 2 minutes. Remove the bowl from the mixer, fold in the flour mixture, the cooled toasted coconut, and chocolate chips.
Spread the batter evenly into the prepared pan and bake for 15 minutes, then rotate the pan and bake until a tester comes out barely clean, another 10 minutes. The surface should be dry to the touch. Cool in the pan and serve.