Put flour, salt, fat and 1 egg into a mixing bowl and knead with the dough hooks of the hand mixer. Then work into a smooth dough with cool hands and let it rest covered in the fridge for about 30 minutes.
In the meantime peel the onions and cut them into slices. Cut the bacon into pieces. Heat the oil in a pan, fry the bacon in it until crispy while turning, remove. Steam onions in the frying fat for 12-15 minutes at low heat.
Season with salt and pepper. Let it cool down a little. Roll out the short pastry on a lightly floured work surface to a thickness of approx. 5 mm and cut out 4 circles (approx. 18 cm Ø). Grease four gratin dishes (approx. 15 cm Ø, 300 ml capacity) and line them with the pastry.
Mix onions and bacon and spread on the dough. Mix milk, remaining eggs and sour cream, season with salt, pepper and caraway. Pour over the onions. Bake in the preheated oven (electric cooker: 200 °C/ convection oven: 175 °C/ gas: level 3) for 35-40 minutes.
Garnish with marjoram.