Whisk the flour, baking powder, and salt together in a medium bowl. Set aside.
In a large bowl using a hand mixer or a stand mixer fitted with a paddle attachment, beat the butter and granulated sugar together on medium-high speed until creamed, about 3 minutes. Scrape down the sides and up the bottom of the bowl as needed. Add the egg, egg yolk, and vanilla extract and beat on high speed until combined, about 1 minute. Scrape down the sides and up the bottom of the bowl and beat again as needed to combine.
Add the flour mixture to the wet ingredients and mix on low speed until combined. Dough will be thick and sticky. Remove from the mixing bowl—no need to rinse out the mixing bowl.
Divide the dough in half. Place half of the dough back into the mixing bowl. Add the cocoa powder, milk, and espresso powder (if using). Beat on low speed until dough is combined.
Place both doughs on a lightly floured work surface. With lightly floured hands, carefully form each dough into a 1-inch-thick rectangle block, about 4×5 inches in size. Wrap both dough blocks up in plastic wrap, parchment paper, or aluminum foil. Refrigerate for 60–90 minutes.
Remove vanilla dough from the refrigerator and unwrap. Keep chocolate dough in the refrigerator. Lightly flour a piece of parchment paper. Using a lightly floured rolling pin, begin rolling out the vanilla dough to an 8×14-inch rectangle, and use your hands to ensure the sides are straight and smooth. Set the dough aside, and refrigerate the vanilla dough.
Lightly dust another piece of parchment paper with flour or cocoa powder. Roll the chocolate dough out to an 8×14-inch rectangle. Carefully peel the chocolate dough off the parchment and line it up on top of the vanilla dough. Flatten the chocolate dough on top as best you can.
Starting with a long side, tightly roll the 2 doughs together, making sure there are no gaps between them. Cut the log of dough in half, so you have two 7-inch-long dough logs.
Wrap each dough log in plastic wrap, parchment paper, or aluminum foil and refrigerate for 2 more hours and up to 4 days.
Preheat oven to 350°F (177°C). Line 2 baking sheets with parchment paper or silicone baking mats.
Slice each log into 14 ½-inch-thick cookies. Arrange cookies about 2 inches apart on the prepared baking sheets. Bake for 14–15 minutes or until very lightly browned around the edges.
Remove from the oven and allow cookies to cool on the baking sheet for 5 minutes before transferring to a wire rack to cool completely.
Coarsely chop the chocolate. Melt in a double boiler or the microwave. Dip half of each cooled cookie into the chocolate. Add sprinkles on top of chocolate, if desired. Allow chocolate to completely set at room temperature or in the refrigerator.
