In Indian cooking (which uses a lot of legumes) our solution is to soak them overnight and discard the water - cuts down the raffinose and overall cooking time. We also almost universally cook them in pressure cookers - even the toughest beans cook rapidly in a pressure cooker if soaked - maybe 15 minutes?
https://truefoodconcepts.com/cook-dried-beans/
A quick google of "kombu beans gas" turns up plenty of results.
From https://journals.plos.org/plosone/article?id=10.1371/journal...
>Some red seaweeds are anti-methanogenic, particularly the genus Asparagopsis, due to their capacity to synthesize and encapsulate halogenated CH4 analogues, such as bromoform and dibromochloromethane
It cites studies that suggest the mechanism that's so effective in cattle, and presumably the same in humans, is that the seaweed contains a good combination of compounds which inhibit methane production in anaerobic bacteria in the gut.
It can be worse than a stomach ache.
That's nuts, though I don't understand why undercooked beans would be worse than raw beans, and not the other way round. Maybe the two claims are from different sources.
Leguminosae is a big family and they are masters on alkaloid design. This is the main reason why we made our bread from cereals and not from legume flour. Cereals are more safe to manipulate because their defense is physical, not chemical.