In many parts of Africa the ultimate solution is to peal the skins off the beans. This removes all digestive issues with bean consumption but it's a lot of work.
Another solution is to uses the microbe Aspergillus by consuming Miso paste with the beans which help break down indigestible polysaccharides.