Bring ham hocks and 3 quarts of water to a boil in a large stockpot. Reduce heat to low, partially cover the pot and cook at a gentle boil until meat is tender, about 2 hours.
Remove hocks and let them cool until you can handle them. Remove the skin from hocks and discard. Remove meat from bones and chop into bite-sized pieces. Set aside. Skim any fat from surface of stock. Set stock aside. At this point, you can refrigerate the meat and stock to finish cooking the soup in the next day or two.
Heat some olive oil in a large stockpot or Dutch oven over medium. Add onion, lemongrass, habanero and ginger, and cook, stirring often, until onion is translucent, 4 to 6 minutes. Stir in salt.
Add lentils, 3 cups of water and 3 cups reserved stock to the pot. Bring to a boil over medium-high, stirring occasionally. Reduce heat to medium, and cook, stirring occasionally, until lentils are tender, 10 to 14 minutes. Add additional stock to thin, if needed.
Stir in scallions, chopped thyme, okra and reserved chopped meat. Cook until okra is tender, about 10 minutes. Taste and adjust seasoning with salt, if needed.
Serve in soup bowls, topping with with sliced scallions or chives. You could also use fresh thyme leaves.