Place ham hocks, stock water, quartered onion and bay leaf in a large pot. Bring to a gentle simmer, skim foam and cook partly covered for 2 to 2 1/2 hours until the meat is tender and pulls from the bones.
Lift hocks onto a tray. Strain the stock, discard onion and bay leaf, skim excess fat and measure 5 cups liquid, adding water if needed.
Remove skin, bones and gristle from the hocks once cool enough to handle and tear the usable meat into bite-size pieces.
Heat butter and oil in a clean soup pot over medium-high heat. Brown mushrooms for 7 to 8 minutes, add garlic for 30 seconds, then pour in wine and reduce by half, about 3 minutes.
Add the measured stock, lentils, pearl onions, thyme, pepper and ham meat. Simmer partly covered for 30 to 40 minutes until lentils are tender but intact and ham reaches 165°F.
Stir in sherry vinegar and taste before adding up to the measured salt. Divide among six bowls.