Begin with the custard. Put the yolks and sugar in a bowl and whisk until pale and creamy. Whisk in the flour until smooth. Pour the milk into a heavy-based saucepan, add the vanilla seeds and pod, then put over a medium heat until just about to boil. Remove from the heat, then slowly pour around half the milk over the eggs, whisking constantly. Add the rest of the milk, whisk again, then pour the mixture back into the pan.
Bring the mixture to the boil, whisking constantly. Cook for 1 minute, then remove from the heat and stir in the chocolate. Pour into a clean bowl, remove the vanilla pod (see Tips), then give the mixture another stir to ensure all the chocolate has melted. Cover with baking paper, making sure it’s touching the custard to prevent a skin forming, then leave to cool.
For the brioche dough, put the milk, egg, honey and olive oil in a stand mixer with a dough hook attached. Add the flour, then break up the fresh yeast and put it on one side of the bowl and the salt on the other side. Pinch small pieces of butter and scatter them over the top until all used up. Mix at a slow speed for 4 minutes, then increase the speed to medium and mix for 10-12 minutes or until you have a dough that comes cleanly away from the sides of the bowl.
Lightly dust your work surface and a clean bowl with flour. Use a scraper to turn out the dough, then form it into a ball and leave to rest in the bowl, covered, for 45 minutes until just under double the size.
Flour the work surface again, turn the dough out, knock back (knead briefly), then reform into a ball. Put it back in the bowl, cover and leave for another 30 minutes
Add a little more flour to your work surface, then roll the dough out into a rectangle about 40cm x 30cm. Spread the cooled custard over the top, then add the sultanas (if using). Roll up the dough lengthways (like a Swiss roll), then cut in half to create 2 equal rolls.
Cut one of the rolls in half lengthways, exposing the chocolate layers inside. Twist the 2 lengths together to form a plait. Repeat with the second roll. Line 1 large or 2 medium baking trays with baking paper, then put the twisted loaves on top. Cover with freezer bags, then leave to prove somewhere warmish for 45 minutes to 1 hour or until nearly doubled in size.
Heat the oven to 190°C fan/gas 6½. Make the first glaze by beating the eggs with a pinch of salt. Brush the glaze over each loaf, then put the tray/trays in the oven and turn the temperature down to 180°C fan/gas 6. Bake for 20-25 minutes until the custard has set and the dough is golden and shiny.
Meanwhile, make the second glaze. Put the sugar, rum and 100ml water in a small pan and bring to the boil. Turn down to a simmer and cook until you have a thick syrup (about 8 minutes). Remove the loaves from the oven, transfer to a wire rack and, while still warm, brush the tops generously with the rum glaze.