Prep the cooker: Grease a 4- to 6-quart slow cooker with nonstick spray or butter. This helps prevent sticking and keeps the edges tender.
Mix the dry ingredients: In a medium bowl, whisk flour, granulated sugar, 1/4 cup cocoa powder, baking powder, and salt until evenly combined.
Whisk the wet ingredients: In another bowl, whisk milk, melted butter, egg, and vanilla. Make sure the butter isn’t scorching hot before adding the egg.
Combine into a batter: Pour the wet mixture into the dry and stir until just combined.
The batter will be thick. Fold in the chocolate chips if using.
Spread in the slow cooker: Scrape the batter into the greased slow cooker and smooth the top with a spatula.
Make the pudding topping: In a small bowl, mix the remaining 1/4 cup cocoa powder with the brown sugar. Sprinkle this mixture evenly over the batter.
Pour on the hot liquid: Carefully pour the very hot water or coffee over the top.
Do not stir. The liquid looks strange now, but it becomes the pudding layer as it cooks.
Cook low and slow: Cover and cook on High for 1 hour 45 minutes to 2 hours 15 minutes, or on Low for 3 to 3 1/2 hours. Start checking at the early end.
The cake should be set around the edges with a glossy, saucy center.
Rest and serve: Turn off the heat and let it sit, covered, for 10 minutes. This helps the sauce thicken slightly. Scoop into bowls, making sure to get both the cake and the pudding, and serve with cold ice cream.