Place the peas in a large pot or bowl, cover them with water by 2 inches and let them soak for 8 hours or overnight.
Drain the peas and set aside.
Score the ham hock. Place it in a pot, cover with at least 8 cups water; bring to a boil. Reduce the heat and let it simmer for 1 hour.
Drain it and set it aside; reserving 8 cups of the broth.
In a large pot, melt the butter over medium-high heat. Add the onions and cook, stirring, for 2 minutes. Add the celery and carrots; cook, stirring, until just soft, about 3 minutes. Add the garlic; cook, stirring, for 30 seconds. Add the ham hock and ham; cook, stirring until beginning to brown.
Add the drained peas, salt, pepper, and pepper flakes; cook, stirring for 2 minutes.
Add the broth, the bay leaf and thyme; cook, stirring occasionally, until the peas are tender, about 1 hour. (Add more water as needed, if the soup becomes too thick or dry)
Remove the bay leaf and discard. Adjust the seasoning, to taste, and serve immediately.