Holding the chiles one at a time with metal tongs, quickly toast them by turning them an inch or two above an open flame for a few seconds until the aroma fills the kitchen. (Alternatively, toast chiles in a dry pan over medium heat, pressing them flat for a few seconds then flipping them over and pressing again.)
When cool enough to handle, stem and seed the chiles, break them into pieces and put them in a blender along with tomatoes and their juice. (A food processor will work, though it won’t completely puree the chiles.)
Heat 2 tablespoons oil in a Dutch oven over medium heat. Add onion and garlic and cook, stirring frequently, until golden, 6 to 9 minutes. Scoop up the onion and garlic with a slotted spoon and transfer to the blender with the tomato mixture. Process until smooth.
Return the pot to medium heat. When quite hot, add the puree and stir nearly constantly until thickened to the consistency of tomato paste, about 6 minutes. Add broth, water and epazote (if using). Bring to a boil, then adjust heat to maintain a simmer.
Drain tofu, rinse and pat dry; cut into 1/2- to 3/4-inch cubes. Heat the remaining 2 teaspoons oil in a large nonstick skillet over medium heat. Add the tofu and cook in a single layer, stirring every 2 to 3 minutes, until beginning to brown, 6 to 8 minutes total. Add the tofu to the soup and simmer for 30 minutes.
Add chard (or spinach or kale) to the soup and season with salt to taste, depending on the saltiness of the broth. Cook, stirring, until the greens are wilted, about 2 minutes, depending on the type of greens.
Ladle the soup into 8 soup bowls. Divide avocado, tortilla chips and cheese (if using) among the bowls. Serve warm, with lime wedges.