Mix sugar, coca powder, cornstarch, and salt together in a saucepan.
Whisk in ¼ cup non-dairy milk until mixture is foamy and smooth.
Continue adding and whisking non-dairy milk, in small increments, into the chocolate mixture until smooth.
Place saucepan over medium-high heat and cook, stirring constantly, until mixture comes to a simmer and thickens (about 6-9 minutes).
Remove saucepan from heat. Add chocolate candy bar pieces and vanilla extract. Stir well until chocolate is melted and mixture is smooth.
Pour into baked, cool pie shell.
Refrigerate until until chilled and set (2-4 hours or longer)