Heat oil in a 12-quart pot over medium-high heat. Add onions; saute until translucent, about 5 minutes. Add beans and enough water to cover by 3 to 4 inches. Stir in tomato paste, garlic, dried onion, mustard seeds, chile pods, cinnamon sticks, cardamom, cumin seeds, oregano, brown sugar, and epazote. Bring to a boil. Cover and reduce heat. Simmer, stirring occasionally, until beans are tender, 3 1/2 to 4 hours. Uncover and increase heat to high. Boil, stirring from the bottom to make sure the beans do not burn, mashing a bit as you stir, until the sauce has thickened, about 30 minutes. Season with salt.