Preheat your oven to 350F. Stir together the almond flour, cocoa powder, powdered erythritol, and salt. Mix in the melted butter until well combined. Press firmly into the bottom and up the sides of a 9-inch pie dish. Bake for 10 to 12 minutes until set. Let cool completely.
Melt the sugar-free dark chocolate and butter together in a heatproof bowl set over barely simmering water, stirring until smooth. Remove from heat.
In a medium saucepan, whisk together the egg yolks, granulated erythritol, heavy whipping cream, and xanthan gum. Cook over medium-low heat, stirring constantly, for 6 to 8 minutes until the mixture thickens noticeably and coats the back of a spoon.Remove from heat and whisk in the melted chocolate mixture and vanilla extract until completely smooth and glossy.
Pour the chocolate custard filling into the cooled crust and smooth the top. Press plastic wrap directly onto the surface and refrigerate for at least 3 hours until completely set.
When the filling is set, whip the heavy whipping cream, powdered erythritol, and vanilla extract together until stiff peaks form. Pile the whipped cream generously on top of the pie.
Scatter the toasted chopped pecans over the whipped cream, add chocolate shavings, and dust lightly with cocoa powder. Keep refrigerated until serving and slice with a warm spatula.