Preheat oven to 350F and grease an 8x8 inch baking dish. Mix together the almond flour, cocoa powder, granular erythritol, melted butter, egg, baking powder, and vanilla extract until a thick batter forms. Spread into the dish and bake for 14 to 16 minutes until set. Let cool completely, then cut into small cubes.
For the chocolate pudding, whisk the egg yolks, cocoa powder, and powdered erythritol together in a small saucepan. Pour in the heavy whipping cream and whisk until smooth.Cook over medium-low heat, stirring constantly, for about 5 to 6 minutes until the mixture thickens enough to coat the back of a spoon. Remove from heat, stir in vanilla extract, and let cool completely.
For the chocolate mousse, beat the heavy whipping cream with powdered erythritol and vanilla extract until soft peaks form. Drizzle in the melted and cooled dark chocolate while beating on low, then increase speed to medium-high and beat until stiff peaks form.
Begin assembling the trifle in a large glass trifle dish or individual serving glasses. Place a layer of brownie cubes on the bottom, then spoon a layer of chocolate pudding over them.
Add a thick layer of chocolate mousse on top of the pudding. Repeat the layers once more, ending with mousse on top.
For the topping, whip the heavy whipping cream with powdered erythritol until stiff. Dollop or pipe it generously over the top of the trifle. Garnish with sugar-free chocolate shavings.
Refrigerate for at least 2 hours before serving so the flavors meld and the brownie cubes soften slightly. This trifle tastes even better the next day.