Heat oil in a large pot over medium-high heat. Add onion and cook, stirring, until starting to brown, about 3 minutes. Add ham and garlic; cook, stirring, for 1 minute. Add cabbage, broth, potatoes, salt and pepper. Bring to a boil, then reduce heat to maintain a simmer; cover and cook, stirring occasionally, until the potatoes are tender, about 15 minutes. Remove the lid, increase heat to medium-high and continue cooking and stirring until most of the liquid has evaporated, 10 to 12 minutes. Stir in vinegar.