In a large bowl, mix the flour, water, and salt together with your hands until a shaggy dough forms.
Dust a work surface lightly with flour, then turn the dough out onto the surface and knead until it starts to come together, about 3 minutes. (Knead by pressing the heel of your hand into the dough and pushing the dough away from you, then dragging it back with your hand and repeating.)
Return the dough to the bowl, cover with a kitchen towel, and let rest while you make the topping. (If you prefer to prepare the topping ahead, make the dough and let it rest for 20 minutes before cutting and rolling it out.)
In a large sauté pan over medium-high heat, warm 2 tbsp. of the oil.
Add half of the eggplant, season with ¾ teaspoon of the salt, and cook, stirring often, until the eggplant is soft in the center and has reduced in size by nearly half, about 6 minutes.
Transfer to a food processor
Repeat to cook the remaining eggplant using the same amount of oil and salt, then transfer to the processor.
Add the tomatoes and juices, tomato paste, onion, parsley, garlic, paprika, cumin, oregano, and red pepper flakes to the processor and blend until a chunky purée forms. (You should have about 4 cups.) Let cool to room temperature. If not using right away, cover and refrigerate. You can spread the topping on the flatbread while it is still chilled.
Preheat the oven to 500°F. Have two half-sheet pans ready as well as four sheets of parchment paper cut to fit the pans. (The lahmajoon will be baked one at a time, and the parchment makes it easier to transfer the dough to the pans and free up the pans for the next batch.)
Dust a work surface lightly with flour and put the dough on top. Cut into four pieces and roll each piece into a ball. Dust a rolling pin with flour and roll out one piece of dough into a wide oval long enough to fill the parchment paper (at least 13 inches long). It’s better for the dough to be too thin than too thick. Carefully transfer the first oval to the parchment paper and place on one of the sheet pans. Bake until slightly puffed and golden brown in a few spots, about 5 minutes. While the first pan bakes, roll out the next round of dough, then bake it like the first. If the dough is stubborn and resists being rolled out, let the piece rest some more and start on another piece. Repeat the rolling and baking process until you have a stack of four baked ovals. Keep the oven at 500°F.
When the baked dough is cool enough to handle, spread just under 1 cup of the topping over each piece in an even layer, smoothing it to the edges and ensuring it’s not too thick in places. Bake one lahmajoon at a time until the edges are crisp and browned in spots, 7 to 10 minutes.
Top with a drizzle of oil, a spoonful of yogurt, and herbs and pickled onions (if desired). Serve with lemon wedges. Leftovers can be stored in an airtight container in the refrigerator for up to 5 days and reheated in a toaster oven. Once topped and baked, lahmajoon also can be frozen for up to 1 month. Bake from frozen at 400°F until heated all the way through and crisp on