I realise the answer's probably subjective and might vary among individuals but in your experience, have you found cooking with shallots to be less 'gassy' than using yellow onions?
I'm not allergic to alliums but I become very gassy from them. Even a small amount of onion powder will give me very malodorous gas - fine if I'm alone for the next 24-36 hours. I cook Asian dishes and use a small amount of green onion. While I still have gas, it's less than regular onion.
Please don't suggest asafoetida as I've used it before and didn't think it made a good substitute. It also wouldn't suit the soups and stews I normally use onion in.