Place a large, heavy pot over medium-high heat. Add the butter and once melted, add the onions. Cook until they become translucent, stirring occasionally, for about 10 minutes
Sprinkle the onions with sugar and reduce the heat to medium. Cook, stirring constantly, until onions are soft and browned, at least 30 minutes. Stir in garlic and cook until fragrant, about 1 minute
Stir the sherry into the onion mixture and scrape the bottom of the pot to incorporate any small browned bits sticking there.
Transfer the onions to a slow cooker and pour in beef broth. Add the salt, thyme, and bay leaf and stir to combine.
Cover the slow cooker and cook on HIGH for 4 to 6 hours or LOW for 8 to 10 hours.
About 10 minutes before serving, set one of the oven racks about 8 inches from the heat source and preheat the oven's broiler.
Arrange the bread slices on a baking sheet. Broil bread slices until toasted, about 1 to 2 minutes per side.
Combine the Gruyere, Emmental, Parmesan, and mozzarella cheeses in a medium mixing bowl. Toss gently to combine.
Fill oven-safe soup crocks about 3/4 full of onion soup and then place a bread slice across the top of each bowl so that the bread floats on the soup.
Top each bread slice with about 2 tablespoons of the cheese mixture. Place filled bowls onto a baking sheet and broil until cheese topping is lightly browned and bubbling, about 2 minutes.
Carefully remove from the oven and sprinkle with chopped parsley (if desired) before serving warm.
Notes
If you can't find Gruyere cheese or Emmental cheese (or want to keep things a bit more budget-friendly), you can substitute Swiss cheese for one or both of these cheeses.