Using nonstick baking spray, grease an 8- by 8-inch baking pan. Alternatively, line the baking pan with 2 long strips of parchment to cover the bottom and sides, creasing as needed to ensure a secure fit.
For the Crust: In the bowl of a food processor, pulse together graham crackers, shredded coconut, and walnuts until finely ground. Transfer mixture to a medium bowl.
Place butter in a medium heatproof bowl and set over a saucepan of simmering water. When butter is melted, whisk in sugar and cocoa powder until dissolved, then add beaten egg. Mix until smooth and slightly thickened, about 2 minutes.
Pour melted butter mixture over graham cracker crumbs, tossing to evenly coat crumbs in chocolate and butter mixture. Gently knead until cohesive and transfer to prepared baking pan. Spread into an even layer, then compress firmly with a flat-bottomed drinking glass or measuring cup. Place in the freezer until firm, about 10 minutes.
For the Custard Filling: In a medium bowl, use a hand mixer to beat butter, powdered sugar, custard powder, milk, vanilla, and salt on medium speed until smooth, about 3 minutes. (Alternatively, in a stand mixer fitted with the paddle attachment, beat softened butter, powdered sugar, custard powder, milk, vanilla, and salt on medium speed until smooth, about 3 minutes.) Remove crust from freezer and, using a flexible or offset spatula, spread custard filling over the crust. Refrigerate until set, about 1 hour, then transfer baking pan to freezer until ready to top with chocolate.
For the Chocolate Layer: In a medium heat-proof bowl, combine chopped chocolate and butter. Set bowl over a saucepan of barely simmering water, stirring frequently, until chopped chocolate and butter are melted, about 5 minutes. Whisk until smooth and remove from heat.
Remove baking pan from the freezer. Using an offset spatula, spread chocolate mixture over chilled custard filling to evenly cover bars. Refrigerate bars until fully set, about 30 minutes.
Using a hot knife, slice bars and serve. If not serving immediately, return bars to refrigerator until ready to serve. (For cleaner cuts, run knife under warm water and carefully dry the knife with a clean kitchen towel before portioning each slice.)