To prepare the caramelized onions: In a large nonstick skillet, melt the butter over medium heat. Add the onions and cook, stirring occasionally, until they soften and begin to turn golden brown, about 10 minutes.
Reduce the heat to medium-low and continue cooking, stirring every few minutes, until the onions are deeply caramelized, 25 to 30 more minutes.
Stir in the red wine vinegar, thyme, pepper, and salt. Cook for 1 to 2 minutes more, just until the vinegar is absorbed and the mixture is fragrant.
Remove from the heat and allow the onions to cool to room temperature; spreading them into a thin layer on a plate or baking sheet can shorten this process to about 10 minutes.
While the onions cool, preheat the oven to 375°F with a rack in the center. Lightly grease a baking sheet, or line it with parchment.
To make the dough: In a large bowl, whisk together the flour, baking powder, sugar, thyme, salt, and pepper. Using your fingertips, a fork, or a pastry blender, work in the butter to make an unevenly crumbly mixture; it's OK for some larger, pea-sized chunks of butter to remain unincorporated.
Mix in the Gruyère and cooled caramelized onions, tossing to coat in the flour mixture.
In a small bowl or liquid measuring cup, use a fork to whisk together the cream, eggs, and mustard. Add to the dry ingredients and use a flexible spatula or bowl scraper to quickly and gently mix until a shaggy dough forms; some dry bits are OK.
Transfer the dough to a lightly floured work surface. Fold the dough over onto itself two to four times to incorporate any remaining dry bits and form a cohesive dough; if the dough sticks to the surface or your hands, sprinkle with additional flour as needed.
Pat the dough into an 8" disk (about ¾" thick). Use a chef's knife or a bench knife to slice the dough into eight evenly sized wedges (about 100g each).
Transfer the scones to the prepared baking sheet, leaving at least 1" of space between them. Brush the tops with the egg wash and sprinkle with additional pepper.
Bake for 20 to 25 minutes, until the scones are golden brown on top and around the edges. Remove from the oven and serve warm or at room temperature.