In large Dutch oven, melt butter over medium heat. Add garlic and cook, stirring, until fragrant and just beginning to colour, 2 to 3 minutes.
Add onions and cook, stirring often, until just wilted; reduce heat to medium-low. Continue cooking onions, stirring occasionally and scraping up golden bits from bottom of pot, until they are richly caramelized and golden brown, 45 to 50 minutes.
Add sherry and cook until evaporated and syrupy, 2 minutes. Add stock, wine, thyme, salt and pepper; cook for 15 minutes.
Preheat oven to broil.
Arrange baguette slices on baking sheet. Broil on centre rack until evenly toasted on both sides, about 1 minute per side.
In bowl, combine Emmenthal and Gruyère cheeses. Place 6 oven-safe bowls on baking sheet; divide onion soup among bowls. Sprinkle some of the cheese mixture into each bowl. Layer with a slice of baguette and top generously with remaining cheese. Broil until cheese is melted and bubbly, 1 to 2 minutes.