Can beans be overcooked? Coffee beans, for example, are incredibly roasted. Falafel is baked or fried garbanzo beans. Is it possible to overcook beans, or is this good for breaking down the sugars, phytic acid that cause flatulence, indigestion of legumes? 
Beans can absolutely be overcooked. Coffee beans aren't really beans--they're seeds from a fruit--but they are very temperature sensitive when roasted. There is a wide range of roasts, but dark roast in particular is essentially brought right to the edge and stopped before burning. For folks who like lighter or medium roasts, even dark roasts of coffee can be unpalatably burnt tasting. As far as legumes and "real" beans go--absolutely. Beans can still be burnt (such as over-fried falafel, or grilled haricots verts), or overcooked until they just turn to mush. If you simmer bean soup long enough, the beans will just disintegrate and lose their shape. Dried beans in particular are fairly forgiving--there's a pretty wide range where they are edible & enjoyable. The long cook time on dried beans means hitting the doneness between "not crunchy" and "not mushy" is fairly easy. Fresh beans (haricots verts, green chick peas, fava beans, etc) are quite the opposite. Like other fresh vegetables, the cook time is relatively short and thus it is easy to turn them into a mash by overcooking for just a few minutes. Some people do like mushy vegetables--but many would consider mushy fresh vegetables (including fresh beans) to be a culinary sin. 