Whisk egg yolks and cornstarch in a heatproof bowl until thick.
Combine salt, sugar, heavy cream, and milk in a saucepan.
Heat over medium, whisking until sugar dissolves and the mixture simmers.
Slowly whisk half a cup of the hot milk mixture into the egg yolks.
Pour the egg yolk mixture back into the saucepan, whisking constantly.
Whisk for 1 minute after the mixture bubbles and thickens.
Remove from heat and whisk in butter, chopped chocolate, espresso powder, and vanilla.
Cool filling for 8–10 minutes.
Pour the filling into the cooled crust.
Cover with plastic wrap and chill for at least 5–6 hours or overnight.