Pat the roast dry with paper towels and season with 2 teaspoons of kosher salt and ½ teaspoon of black pepper.
Heat 1 tablespoon of olive oil in a Dutch oven over medium-high heat until shimmering. Add the roast and sear until dark golden-brown on two sides, about 4 to 5 minutes per side. Transfer to a large plate.
Reduce the heat to medium. Add the remaining 2 tablespoons olive oil, onions, remaining 1 teaspoon kosher salt, and remaining ½ teaspoon black pepper to the pot. Stir and cover. Cook undisturbed for 5 minutes, then stir, cover again, and cook for 5 more minutes.
Uncover and cook, stirring occasionally at first, then more frequently until onions are a rich caramel brown color, about 30 to 40 minutes. Adjust heat if needed and scrape the bottom when stirring. Preheat oven to 325°F.
Add minced garlic to the onions and cook for 1 minute. Sprinkle flour over onions, stir well, and cook for 1 minute. Stir in red wine and scrape up browned bits. Then stir in beef broth, thyme sprigs, and bay leaves.
Return the roast and any juices to the pot and bring to a simmer. Cover and transfer to the oven. Cook until meat is falling apart, about 3 to 3.5 hours.
Skim fat off the surface if desired. Remove and discard thyme stems. Shred the roast in the pot before serving and garnish with thyme leaves if desired.