Heat the olive oil in a skillet over medium-high heat.
Add the diced onion, celery, and carrots. Cook for 4 to 5 minutes until the vegetables soften and begin to brown lightly.
Stir in the minced garlic and cook for 30 seconds until fragrant, then transfer the vegetable mixture to your slow cooker insert.
Add the chicken stock, rinsed dried beans, diced ham, ham bone if using, thyme, rosemary, bay leaves, salt, and black pepper to the slow cooker. Stir well to combine the ingredients.
Cover and cook on high for 5 to 6 hours, or until the beans are completely tender. Ensure the pork reaches an internal temperature of 145°F (63°C) with a 3-minute rest.
Remove and discard the bay leaves.
If you used a ham bone, take it out, shred any attached meat into the slow cooker, and discard the bone.
Taste the broth and add more salt or pepper if needed.
Ladle the soup into bowls and garnish with chopped fresh parsley before serving.