Make the Cookie Layers
Preheat the oven to 350°F (180°C) and butter four 9-inch (23 cm) cake pans. Line each pan with parchment paper and set aside.
In the bowl of a stand mixer fitted with a paddle attachment (or with a handheld electric mixer and a large bowl), whip the butter, granulated sugar and brown sugar on high for 1-2 minutes, until combined.
Add the eggs and vanilla extract and mix on medium-low speed, scraping down the sides of the bowl once or twice, until fully mixed.
In a large bowl, mix together the flour, baking soda and salt. Turn the mixer speed to low and gradually add in the flour mixture until just combined, and lastly, fold in the chopped chocolate (or chocolate chips).
Divide the dough among the cake pans (about 21 oz/600 g per pan) and press to the edges in an even layer. Top with M&Ms, if using, pressing them slightly into the dough.
Bake the cookie layers for about 20 minutes, rotating halfway through, until golden and just barely set. Be careful not to over bake, you want them soft and doughie. Let cool in the pans for 15 minutes, then invert onto a wire rack to cool completely.
Assemble the Cookie Cake
First, choose the best looking cookie to be the very top of your masterpiece and set aside.
Place one of the remaining layers on a serving plate and spread about ¾ cup (6 oz/170 g) of frosting onto the cookie. Continue layering cookies and frosting. Top with your best looking cookie. Leave the sides and top unfrosted to show contrast.
Store covered and at room temperature for up to 2 days.