5 tablespoons unsalted butter, divided
3 pounds Vidalia onions (about 4 medium), halved lengthwise, peeled, and thinly sliced
1 tablespoon vegetable oil
1 teaspoon salt
1/2 teaspoon freshly ground black pepper
1/2 teaspoon granulated sugar
1 1/2 cups dry white wine
6 cups beef broth
10 sprigs thyme
2 bay leaves
1 garlic clove, cut in half lengthwise
2 teaspoons sherry
4 ounces Gruyère cheese, grated
In a large Dutch oven or other large pot, melt 3 tablespoons butter over medium heat. Add the oil and onions; cook onions are until softened, stirring occasionally, about 15 minutes. Add the salt, pepper, and sugar; continue to cook, stirring occasionally, until onions are deep golden brown and caramelized, reducing heat slightly if onions seem to be browning too quickly, 35 to 45 minutes more.
Add wine and raise heat to high. Cook until almost all liquid has evaporated, 8 to 10 minutes.
Tie thyme and bay leaves into a bundle with twine. Add broth and herb bundle to pot with onions. Bring to a boil, reduce to a simmer, and cook, uncovered, until broth is thickened and flavorful, 20 to 30 minutes. Remove from heat and whisk in remaining 2 tablespoons butter. Taste and adjust seasoning.
Heat the broiler. Cut two 1/2-inch baguette slices for every serving of soup. Place baguette slices on a rimmed baking sheet and toast in oven until crisp and dry but not browned, about 1 minute per side. Rub one side of each toast with the garlic clove and set aside.
Place ramekins or ovensafe bowls on a rimmed baking sheet, add 1/2 teaspoon of sherry to the bottom of each, and ladle soup on top. Top each serving of soup with two garlic-rubbed toasts. Divide cheese among the servings, covering the bread and some of the soup.
Carefully transfer baking sheet to oven and broil until cheese is melted and bubbling, 4 to 8 minutes. (Alternatively, if using regular soup bowls: Top each garlic-rubbed toast with some cheese and return to broiler to melt, about 2 minutes more. Divide sherry and soup among bowls, sprinkle with remaining cheese, and top each serving with two cheese toasts.)