Heat the butter in a large saucepan over medium heat, about 4 minutes. Add the onions with a pinch of salt and patiently cook, stirring often, until caramelized, 15-20 minutes. If the pan becomes too dry during cooking, add a splash of water (1-2 tablespoons).
Add the flour and mix with a wooden spoon about 1 minute, until it starts to brown.
Add the wine. Mix well. Cook about 2 minutes, until most of the wine evaporates.
Add the beef broth, the black pepper, and the dried thyme. Bring to a boil over high heat. Reduce the heat to medium-low and simmer, uncovered, stirring often, until the soup is noticeably thicker, about 20 minutes. Serve immediately.