In a heatproof bowl, whisk together the egg yolks and sugar. Set over a pot of simmering water (double boiler style) and whisk constantly for about 8–10 minutes until the mixture is thick and pale. Remove from heat and let cool slightly.
In a separate bowl, whip the heavy cream until stiff peaks form.
In another bowl, whisk the mascarpone until smooth. Gently fold it into the cooled egg mixture.
Fold the whipped cream into the mascarpone-egg mixture until fully combined and smooth. Be gentle to keep it airy.
Combine the espresso with the coffee liqueur (if using) in a shallow bowl.
One by one, quickly dip the ladyfingers into the coffee mixture (don’t soak them too long) and arrange them in a single layer in a 9x13-inch (or similar) dish.
Spread half of the mascarpone cream mixture over the ladyfingers.
Add another layer of dipped ladyfingers and then the remaining mascarpone cream.
Cover and refrigerate for at least 6 hours, preferably overnight, to allow flavors to meld.
Before serving, dust generously with cocoa powder and add chocolate shavings if desired.