In the bowl of a stand mixer, whisk together the warm milk, sourdough starter, sugar, eggs, and egg yolk until well combined.
Add the flour and salt to the wet mixture and mix on low speed or by hand until a rough dough forms and no dry flour remains.
Knead with the dough hook on medium-low speed for about 5–7 minutes until the dough starts to feel elastic.
Add the soft butter to the dough in 3–4 additions, mixing well after each until fully incorporated and the dough is smooth and slightly tacky.
Continue kneading for another 5–8 minutes until the dough is very smooth, stretchy, and can be pulled into a thin windowpane without tearing.
Shape the dough into a ball, place it in a lightly oiled bowl, cover, and let it rest at room temperature for 3–4 hours until slightly puffy.
Transfer the covered dough to the refrigerator and cold-proof it for at least 8 hours or overnight to develop flavor and firm up for easier shaping.
About 30 minutes before shaping, prepare the chocolate filling by combining chopped chocolate, cocoa powder, powdered sugar, melted butter, and salt in a heatproof bowl.
Set the bowl with the filling mixture over a small saucepan of barely simmering water and stir until the chocolate is melted and the mixture is smooth and spreadable, then let it cool to a thick but spreadable consistency.
Grease the loaf pan and line it with a strip of parchment paper that overhangs the long sides for easy removal.
Remove the chilled dough from the refrigerator and let it sit at room temperature for 10–15 minutes to soften slightly.
Lightly flour your work surface and roll the dough into a rectangle about 30x40 cm (12x16 inches), with the long side facing you.
Spread the cooled chocolate filling evenly over the surface of the dough, leaving a 1.5–2 cm (½–¾ inch) border on all sides.
Starting from the long edge closest to you, tightly roll the dough into a log, pinching the seam to seal.
Place the log seam-side down and use a sharp knife to trim 1–2 cm (½ inch) from each end to neaten.
Slice the log lengthwise down the center to expose the swirled layers, creating two long strands.
With the cut sides facing up, gently twist the two strands together, crossing one over the other to form a braid while keeping the cut sides exposed.
Carefully lift the twisted loaf into the prepared pan, tucking the ends under if needed to fit.
Cover the pan loosely with plastic wrap or a kitchen towel and let the babka proof at warm room temperature for 3–5 hours, or until noticeably puffy and risen close to the top of the pan.
About 30 minutes before baking, preheat the oven to 180°C (350°F).
Once proofed, place the babka on the center rack and bake for 35–40 minutes, or until deeply golden brown and a skewer inserted in the center comes out with no raw dough.
While the babka bakes, make the syrup by combining water and sugar in a small saucepan and simmering until the sugar dissolves, then remove from heat and stir in vanilla extract.
As soon as the babka comes out of the oven, brush the hot loaf generously with the warm syrup until it is well coated and glossy.
Allow the babka to cool in the pan for 15–20 minutes, then use the parchment overhang to lift it onto a cooling rack to cool completely before slicing.