Melt the butter in a large pot over low heat, add the onions and cook until caramelized and nicely browned, about 30 minutes. Stir frequently.
Next, stir in the garlic and cook for 1 to 2 minutes...be careful not to leave it and have it burn.
Add the olive oil to the pot and then the mushrooms, stirring to coat them. Turn the heat to medium high and sauté for about 10 minutes or until the mushrooms are cooked down. Stir often.
Add the Sherry to the pot and de-glaze the bottom; cooking until the Sherry has been absorbed by mushroom/onion mixture, about 5 minutes; stirring often.
Set aside about 1/3 of the mushroom mixture; keeping as many onions in the pot as possible; rough chop the mushrooms when cool.
Add the flour to the mushrooms in the pot and stir to combine, cook on medium heat for 1 to 2 minutes. Add the chicken stock and stir until it starts to boil and thicken a bit; turn off the heat.
Puree the soup using a stick blender or regular blender until smooth. If using a regular blender, do half container portions at a time. Return soup to pot.
Add the saved mushrooms (keeping out 1/4 cup for garnish, if desired), heavy cream, parsley, thyme, salt, and pepper. Continue to simmer for a few minutes to release the herb flavors.
You can eat this soup right away, garnishing the top with some mushrooms and fresh herbs but I like to let it sit in the fridge overnight and have all those flavors meld before reheating and serving.