Sort through the navy beans, discarding any stones or damaged beans, then rinse thoroughly. Place in a large bowl and cover generously with water. Stir in the salt and baking soda and soak overnight.
Drain and rinse the soaked beans. Place them in a Dutch oven or large pot with the smoked ham hock. Add fresh water or light chicken stock to cover the beans by about 2 inches.
Bring to a boil, then reduce the heat to a gentle simmer. Partially cover and cook until the beans are tender, checking occasionally and adding water as needed to keep them submerged. Begin checking after 1 hour; older beans may take considerably longer.
Remove the ham hock and let it cool until comfortable to handle. Pull the meat from the bone, chop into bite-sized pieces, and return the meat to the soup. Discard the bone, skin, and excess fat.
Meanwhile, heat the olive oil or butter in a skillet over medium-low heat. Add the onion, celery, and carrot. Cook slowly, stirring occasionally, until softened and the onion is sweet and lightly golden. Add the garlic and cook for another minute.
Stir the sautéed vegetables and thyme into the soup. Simmer gently for another 20–30 minutes, until the carrots are tender and the flavors have come together.
Adjust the consistency with additional water or stock if needed. Taste and season with black pepper, adding salt only if necessary.
Serve hot with warm, crusty bread.