Remove the first layer of skin from the onion and slice it thinly.
Wash the zucchinis, remove the ends, and cut them into even slices.
In a large skillet, sauté the onion and bacon in olive oil with a bit of salt over medium-high heat for 5 minutes, stirring regularly.
Add the zucchini slices, season with salt, and cook for another 5 minutes, stirring regularly.
In a saucepan, melt the butter in pieces.
Add the flour all at once and cook for 3 minutes, stirring constantly.
Gradually add the milk while whisking continuously.
Add the grated cheese and cook for another 5 minutes. Season with salt and pepper.
Remove from heat and add the egg yolks, mixing well.
Pour the zucchini and bacon mixture into a gratin dish. Cover with the béchamel sauce.
Sprinkle with breadcrumbs and bake at 180°C (350°F) for 20 minutes.