Prepare the cake batter: Sift the all-purpose flour, cocoa powder, and baking powder into a large mixing bowl. Add the sugar and mix well.
Add the eggs, cooking oil, and milk. Whisk until the batter is smooth and free of large lumps.
Prepare the baking dish: Lightly grease a microwave-safe glass or ceramic baking dish with oil or butter. Line the bottom with microwave-safe parchment paper if desired.
Pour the chocolate batter into the prepared dish. Do not overfill the container; the batter should have enough room to rise.
Microwave the cake: Cook the cake on high power. Start with about 3 minutes for a higher-wattage microwave, then check the center. A 700-watt microwave may require approximately 5 minutes, while other models may need more or less time.
Insert a toothpick or thin skewer into the center. If it comes out clean or with a few moist crumbs, the cake is done. If wet batter remains, continue cooking in 1-minute intervals until fully cooked.
Carefully remove the cake from the microwave and allow it to cool before removing it from the dish. Transfer it to a cake rack or serving plate and let it cool completely.
Make the frosting: In a saucepan, combine the cocoa powder, all-purpose flour, and sugar. Gradually add the milk while stirring until smooth.
Place the saucepan over low heat. Stir continuously until the mixture thickens, about 4 minutes.
Add the butter and stir until completely melted and incorporated. Add vanilla extract if desired. Continue stirring until the frosting is smooth and glossy.
For a thicker frosting, transfer it to a container and refrigerate for about 30 minutes.
Decorate the cake: Once the cake has completely cooled, trim the top if you want a flatter surface. Spread the chocolate frosting over the cake and decorate with your preferred toppings.
Slice into serving pieces and enjoy!