Melt the butter and oil together in a large dutch oven over medium-low heat. Add in the onions, then stir to coat the onions in the butter and oil. Cook for fifteen minutes, stirring occasionally to make sure none of the onions burn.
After fifteen minutes, season the onions with the salt and a generous helping of fresh black pepper. Stir to cover the onions in all the seasoning. Let the onions cook for about 40-50 minutes, stirring every 5 minutes or so until the onions are a deep brown-amber color. If the onions are sticking to the pan, turn the heat down a bit and splash in a bit of the alcohol or broth and stir. The caramelization happens slowly, it will not happen quickly; if you turn up the heat, the onions will burn.
After onions are caramelized, add the minced garlic and cook for 1-2 minutes, then toss in the all-purpose flour and stir well to coat the onions and garlic. Stir for one minute to cook out the raw flour taste.
Add thyme and bay leaves to the pot. Then splash in broth, a little at a time, stirring well to ensure there are no lumps of flour. After adding about two cups of broth, add the rest in one cup at a time and stir the broth to ensure no lumps. Bring to a boil.
Turn down heat to medium-low and partially cover your pot with a lid. Simmer for 3 hours, stir occasionally to make sure no onions are sitting at the bottom burning.
Taste soup and season with kosher salt and pepper to taste. Remove the bay leaves.