Mix the yeast and sugar with a bit of the lukewarm milk, allowing it to sit for 5 minutes until bubbly.
Add the rest of the dough ingredients and knead for 5 minutes. Cover the dough and let it rise in a warm place for 1 to 1 ½ hours until it doubles in size.
While waiting, grease your baking dish with soft butter and slice the onions into rings or half rings.
Sauté the onions in butter over medium heat until soft and translucent, about 10 minutes. Avoid browning them. Stir in the flour, then let it cool. Season generously with salt.
Whisk together the eggs and cream. If using caraway seeds, either mix them in now or reserve them to sprinkle on top.
Once the dough has risen, press it evenly into your greased baking pan, creating a slight edge along the sides.
Spread the cooled onions over the dough, then pour the egg-cream mixture over the top. Sprinkle the caraway seeds if you haven’t already, and evenly distribute the bacon pieces.
Bake the pie at 390°F on the middle rack for 35-45 minutes, until the filling is set and the crust is golden brown. Give the pan a gentle shake—if the center doesn’t jiggle, it’s ready.
Let the pie cool for 10 minutes before serving. Enjoy warm with a crisp salad and your favorite German wine.