This recipe makes more caramelized onions than you need. Set some aside before turning the rest into soup, and use them on toast, with pasta, or in omelets.
In a large Dutch oven or other heavy pot, heat oil and 2 tablespoons butter over medium-high. Add onions, sugar, 2 teaspoons salt, thyme, and bay leaf. Reduce heat to medium-low and cook, stirring frequently to scrape up any browned bits, until onions are deep golden brown and have a jam-like consistency, about 1 hour. If onions begin to stick, reduce heat and stir in 1 tablespoon water.
Discard herbs. Reserve 1/2 cup onions (leaving 1 3/4 cups in pot). Stir in 1 tablespoon butter, flour, and sherry and cook until butter is melted, 30 seconds. Add broth, increase heat, and simmer 15 minutes. Season to taste with salt and pepper. Rub bread with garlic, then place in bowls and ladle soup on top. Drizzle with oil and sprinkle with parsley.