Blend onion for 2 seconds (speed 5), then scrape down sides. Add butter, flour, milk, egg yolk, salt, pepper, and nutmeg. Cook 8 minutes at 90°C on speed 4 until thick and smooth.
Add 100g grated Emmental. Cook 1 minute at 90°C on speed 4 until melted and creamy.
Lightly butter a gratin dish. Spread a thin layer of sauce on the bottom.
Add lasagna sheets. Top with one-quarter of the sauce, 2 ham slices, and one-third of the raclette.
Repeat twice with pasta, sauce, ham, and raclette.
Top with last pasta layer, remaining sauce, and 40g grated Emmental.
Bake at 200°C (400°F) for 20 minutes until golden, bubbly, and crisp on top.