In a large Dutch oven over medium high heat, saute the bacon until very crispy and all of the fat is rendered, 4 to 6 minutes. Remove the bacon using a slotted spoon and transfer to a paper-lined plate to drain. Set aside. Remove all but 1/4 cup of the bacon drippings from the pan and save for another use. To the hot bacon drippings add the onion and cook until lightly caramelized, 4 to 6 minutes. Add the garlic and cook for 1 minute, stirring. Add the corn, thyme, 1 teaspoon of the salt, and 1/2 teaspoon of the pepper and cook, stirring occasionally, for 3 to 4 minutes. Add the beans, remaining teaspoon of salt and remaining 1/4 teaspoon of pepper and cook, stirring, for 2 minutes. Add the stock, bring to a boil, and reduce the heat to a brisk simmer. Continue to cook, stirring occasionally, until the liquid is almost completely reduced, 12 to 15 minutes. Add the green onions, stir to combine, then cover and remove from the heat. Let sit for 30 minutes to 1 hour, stirring occasionally, to allow flavors to marry. Reheat slowly, if necessary, before serving.
If heirloom beans are available, then they are a great choice. This dish is even better if prepared 1 day in advance. Take care to reheat slowly so that the beans do not become mushy - and add a bit of water, if necessary, to facilitate reheating.