Activate the yeast. Stir the yeast and sugar into the lukewarm milk. Let it sit for 5 minutes, until the mixture begins to look foamy. If using instant yeast, you can skip this step and add the yeast directly to the flour.
Make the dough. Add the flour and salt to the bowl of a stand mixer and make a well in the center. Pour in the melted and cooled butter and the yeast mixture. Using the dough hook, knead for about 6 minutes, until the dough is smooth, soft, and elastic. If the dough feels very sticky, add flour a tablespoon at a time. If it seems too dry, add a small splash of milk.
Let the dough rise. Shape the dough into a ball and place it in a lightly greased bowl. Cover loosely and let rise in a warm place for about 1 hour, or until nearly doubled in size.
Cook the bacon. While the dough is rising, add the finely diced bacon to a large skillet. Cook until the bacon is nicely browned.
Cook the onions. Add the diced onions and 2 tablespoons butter to the skillet with the bacon. Reduce the heat to medium-low. Cook slowly for 30 to 40 minutes, stirring occasionally, until the onions are very soft and golden. Do not rush this step or use high heat. Remove the pan from the heat and allow the onion and bacon mixture to cool for 10 to 15 minutes.
Make the filling. In a large bowl, whisk together the sour cream, eggs, flour, salt, caraway seeds, and freshly ground black pepper until smooth. Once the onion and bacon mixture has cooled, stir it into the sour cream mixture until evenly combined.
Preheat the oven. Preheat the oven to 400°F.
Shape the crust. Butter a 10-inch springform pan. Roll the risen dough into a circle approximately 1/8 to 1/4 inch thick. Carefully transfer it to the pan. Press the dough evenly across the bottom and up the sides, stopping about 1/2 inch below the top edge of the pan. Trim away any excess dough.
Add the filling. Pour the onion filling into the prepared crust immediately. The weight of the filling will help keep the yeast dough from shrinking down the sides. Smooth the top and sprinkle with a few additional caraway seeds, if desired.
Bake. Place the springform pan on the middle oven rack and bake for 55 to 60 minutes. The Zwiebelkuchen is ready when the top is lightly golden brown and the center feels mostly firm when gently pressed.
Cool and serve. Remove from the oven and let the Zwiebelkuchen rest in the pan for at least 20 minutes. Carefully release the springform pan, then slice. Serve warm, lukewarm, or cold.