To prepare onions: Heat oil in a large skillet over medium heat. Add sliced onions, 2 teaspoons thyme and 1/4 teaspoon each salt and pepper. Cook, stirring occasionally, until golden, 20 to 25 minutes. Add wine and cook, stirring occasionally and reducing heat if necessary, until the onions are deep golden brown, 20 to 25 minutes more. Add vinegar, increase heat to high and cook, scraping up the browned bits, until the vinegar evaporates, about 1 minute. Transfer to a large bowl.