Brush the mushrooms clean with a dry towel. Place mushrooms in a food processor in batches, about 1/4 at a time, and pulse several times to grind. You want them finely diced, but not mushy. (See notes.)
Heat a tablespoon of water in a Dutch oven over medium-high heat. Add the onion and a pinch of salt and saute for 5 minutes. Add the garlic and saute for 2 minutes. Add water a little at a time if things begin to stick.
Add the mushrooms and saute until well browned and the liquid has evaporated, about 10 minutes.
Reduce the heat to medium, add the cumin, chili powder, fennel, cayenne pepper and cocoa powder. Stir, and cook 3 minutes, adding water 1-2 tablespoons at a time if things begin to stick.
Deglaze (loosen and scrape up any brown bits) with the coffee. Add the smashed tomatoes and their liquid, beans, and water and simmer, covered, for at least 30 minutes and up to one hour.
Shitake mushrooms can be expensive, but add a rich, earthy flavor. It's fine to use a smaller amount shitakes or substitute them completely with cremini or white button mushrooms. Just make sure you have about 1 1/2 pounds total.
Shitake mushrooms have a tough section on the end of their stem. I snip those off with kitchen shears.
If some large pieces of mushrooms remain, don't keep pulsing. You want them finely ground but not mushy. Remove any large pieces and set them aside. Transfer the ground mushrooms from the food processor to a bowl. Then, add any large pieces back to the processor with the next batch and repeat until all of the mushrooms are finely ground.
Chopping whole tomatoes can make a mess! To avoid this, empty the whole can into a large bowl and break them up them with a potato masher, or place them in the food processor and process on low for about 15 seconds. I prefer to use whole tomatoes, as canned diced tomatoes contain a chemical (to keep them from dissolving), which alters the flavor. Also, I find there's no match for the flavor of San Marzanos.