For the bolognese: Place the aubergine in a large colander and generously salt, tossing to coat. Set in a sink for 15 minutes.
In the meantime, heat the olive oil in a casserole dish or heavy-based saucepan set over a moderate heat until hot.
Stir in the onion, carrot, celery, and a pinch salt, sautéing for 6-7 minutes until starting to colour. Stir in the garlic and cook for a further 1 minute, stirring. Set the dish off the heat.
Wipe away any excess salt and water from the aubergine using some kitchen paper.
Add the aubergine to the dish and set it back over a moderate heat, cooking and stirring until the aubergine is softened, about 3-4 minutes.
Add the red wine and deglaze the base of the dish, stirring and scraping the base with a spoon to release any stuck-on food.
Let the wine reduce by about two-thirds before stirring in the stock, tomatoes, and dried herbs. Bring the sauce to a steady simmer and cook over a low heat for 45-50 minutes until thickened, stirring frequently from time to time to stop it from catching on the base of the pan.
Season to taste with salt and pepper. Set aside to cool.
For the béchamel: Melt the butter in a saucepan set over a moderate heat. Sprinkle over the flour and whisk well to form a roux. Cook until blonde in appearance, 2-3 minutes.
Whisk in the milk in a slow, steady stream until incorporated. Bring to a simmer and cook for 5 minutes, stirring constantly, until slightly thickened. Remove from the heat and whisk in the cayenne and then the egg yolks, one by one. Whisk in the mascarpone and season to taste with plenty of salt and pepper.
To assemble: Preheat the oven to 190°C.
Spoon a little of the béchamel onto the base of a large baking dish. Arrange lasagne sheets on top, breaking to size if needed, and spoon over some of the aubergine bolognese. Top with dollops of ricotta and a layer of béchamel. Repeat this layering order, finishing with a layer of béchamel on top. Sprinkle grated mozzarella on top and cover the dish with foil.
Bake for 1 hour, discard the foil, and continue baking until golden-brown on top, about 10-20 minutes.
Remove from the oven and let stand for 10 minutes before serving.