Heat oil in a large saucepan over medium heat. Add onions and cook, stirring often, until softened, about 10 minutes. Add vinegar, sugar, and salt and bring to a boil. Reduce heat to a low simmer and cook, stirring often, until the liquid has evaporated, about 20 minutes.
Add the water and wine and continue cooking until the onions are very soft and beginning to fall apart, about 1 hour. Add more water, if necessary, to prevent onions from scorching while they cook down. Cool to room temperature before transferring to an airtight container and storing in the refrigerator for up to one month.
Enjoy this great recipe as a spread for roast beef sandwiches, as a relish for roast pork, or spread over a wedge of warm Brie. Makes 2 cups.