Wash the potatoes thoroughly, cover and cook in plenty of boiling water for 20-25 minutes. Drain the potatoes, rinse them under cold water and let them cool down for 2-3 hours
Peel onions and garlic. Chop the onions finely, chop the garlic. Heat oil in a pot, fry garlic and half of the onions in it. Add deep-frozen spinach and 5-6 tablespoons of water and bring to the boil. Cover and simmer for 4-5 minutes, stirring occasionally. Simmer defrosted spinach until no more liquid is in the pot (4-5 minutes). Season spinach with salt, pepper and nutmeg
Finely dice the ham. Cut potatoes into slices. Wash the tomatoes, dab dry and also cut into slices
Heat the fat in a pot and sauté the remaining onions. Add flour and sauté while stirring. Add stock and 450 ml milk bit by bit while stirring. Bring sauce to the boil and simmer for 5-6 minutes. Stir in between. Mix egg yolks and 50 ml milk and stir into the sauce (do not boil any more). Add 100 g cheese and season the sauce with salt, pepper and nutmeg
Place a thin layer of cheese sauce in a greased high casserole dish. Place potatoes, ham, spinach and tomatoes alternately with some cheese sauce in the dish. Finally, spread the rest of the sauce on top and sprinkle with approx. 75 g of cheese. Bake in the preheated oven (electric cooker: 200 °C/ convection oven: 175 °C/ gas: level 3) for 45-50 minutes
waiting time approx. 2 hours