
In a medium saucepan, whisk together sugar, cornstarch, cocoa powder, and salt.
Add milk and whisk to combine.
Transfer to a stovetop over medium heat and cook, whisking constantly until mixture thickens to a pudding-like consistency and coats the back of a spoon. MIxture will likely bubble as it nears the end of the cooking process.
Remove from heat and immediately add chocolate, butter, and vanilla and whisk until butter and chocolate are melted and all ingredients are smooth and combined.
Pour pudding through a fine mesh strainer into a heatproof bowl. Allow to cool for 15 minutes, stirring occasionally. Press a piece of plastic wrap or parchment paper directly against the surface of the pudding (to prevent a skin from forming) and refrigerate until cooled completely, at least 2 hours.
Once pudding has chilled, prepare the whipped cream. In a large mixing bowl, use an electric mixer to beat together heavy cream, sugar, and vanilla until thickened and stiff peaks are achieved (mixture will be a Cool Whip consistency).
Add whipped cream to the (cooled) pudding mixture and use a spatula to gently fold together until combined. Set aside.
Crush cookies into fine crumbs (I use a food processor or place them in a ziploc bag and smash them with a rolling pin).
Scoop about 1 ½ Tablespoons of oreo crumbs into the bottom of your serving cup. Layer with about ⅓ cup pudding, then repeat with another layer of crumbs and pudding and then a final dusting of crumbs on top. If desired, top with gummy worms just before serving.