Sauté the onions and garlic in the oil in a large skillet until they're tender and just starting to caramelize. Stir in the cayenne pepper and the coarsely ground pepper. Cook one minute more.
In a mixing bowl, stir together the ketchup, molasses, vinegars, mustard, chili powder, and red wine. Mix well. Add to the skillet with the onions and garlic. Bring to a boil, then turn down the heat to simmer and simmer for 60-75 minutes until the sauce reaches the desired consistency.
Strain the sauce through a fine mesh strainer over a large bowl or sauce pan, or put the sauce through a food mill or blender. Or use unstrained in a slow cooker. Keeps 4 weeks refrigerated.