Place the onions and sugar in a saucepan, cover and cook with a little oil and non-dairy butter over medium heat until soft, about 20 minutes.
Pour in the red wine vinegar and red wine, then simmer uncovered until the liquid has reduced and the mixture is sticky, about another 20 minutes.
Season well with salt and pepper.
Leave to cool, then transfer to a sterilised jar and seal.
If using a slow cooker:
Cook the onions with the oil and non-dairy butter on low for 3 hours.
Add the rest of the ingredients and cook on high for about 6 hours with a wooden spoon propping the lid open, until reduced and thickened into a jam-like consistency.