Add the heavy cream and milk to a medium saucepan and place over medium heat. Warm the mixture, whisking every so often, until you see small bubbles begin to form around the edges of the pan and steam rising from the surface. As soon as it reaches this gentle simmer, take the pan off the heat so the dairy doesn’t boil.
In a separate medium bowl, whisk the egg yolks until they look smooth and slightly lighter in color. While whisking constantly, very slowly drizzle in about half of the hot cream mixture. This gradual addition helps raise the temperature of the eggs without scrambling them. Once combined, pour the tempered egg mixture back into the saucepan with the remaining cream and whisk to blend.
Return the pan to the stove over medium-low heat. Cook the custard for about 2 minutes, stirring continuously with a spatula or whisk, until it just begins to thicken slightly and lightly coats the back of a spoon. Do not let it boil. When it reaches this stage, turn off the heat.
Add the chopped semisweet chocolate, espresso powder (if using), and kosher salt directly into the warm custard. Let it sit undisturbed for a minute to allow the chocolate to soften and melt, then whisk until the mixture is completely smooth, glossy, and unified.
Pour the custard through a fine-mesh strainer into a clean bowl or a large measuring jug with a spout. This step removes any tiny cooked egg bits and excess bubbles, ensuring a silky, refined texture.
Carefully divide the strained mixture among six 4-ounce ramekins. Place them in the refrigerator and chill until fully set and cold, which will take about 2 hours.
When ready to serve, take the pots de crème out of the fridge and let them stand at room temperature for around 15 minutes so the texture softens slightly and the flavor opens up. Finish each ramekin with a dollop of whipped cream and a scattering of chocolate shavings for a beautiful, decadent presentation.