For the crust: Preheat the oven to 325 degrees F. Line the bottom of a 9-inch springform pan with parchment and set it aside.
In a food processor, combine the chocolate cookies with the coconut oil and salt and pulse until the mixture is sandy and starts to clump together. Add the coconut and pulse just a couple more times to get it evenly distributed.
Press the mixture firmly into the bottom of the prepared pan, pressing it up against the sides to give it a 1- to 1 1/2-inch-tall crust. Bake until set, about 25 minutes. Let it cool.
For the filling: In a medium saucepan, whisk together the milk, sugar, cornstarch, vanilla, salt and egg yolks. Cook over medium-high heat, whisking constantly, until thickened, 3 to 5 minutes. Stir in the shredded coconut and pour into the cooled crust. Refrigerate until set, about 2 hours. (This can be done up to 2 days in advance; keep covered in the refrigerator.)
For the topping: Toast the coconut in a dry skillet over medium heat, stirring often, until golden brown, about 5 minutes. Let it cool.
With an electric mixer or in a stand mixer fitted with a whisk attachment, beat the heavy cream to stiff peaks. Spread it on the pie, then sprinkle with the toasted coconut flakes. Top with shaved chocolate or chocolate sprinkles. Refrigerate until ready to serve.
When you're ready to take it out of the pan, run a small offset spatula around the edge and carefully remove the sides. Enjoy!