It's important to understand that bowel obstructions are rarely caused entirely or exclusively by food. There is usually a structural, motility, or functional issue at play.
If your small bowel obstructions are due to a structural problem (as mine have been - I have adhesions), a dietary change in and of itself will not cure the issue. Obviously, if you are prone to obstructions, you should avoid highly fibrous foods such as raw vegetables, fruits with skins, nuts, seeds, etc - meaning you should follow a low residue diet. At most, dietary changes may reduce the frequency and severity of obstructions, but it will not "cure" the structural issue. On that note, I do not see how simply eliminating gluten will prevent obstructions, other than possibly reducing some of the bulk (though arguably, there are many other non-gluten based foods that have even greater bulking effects - rice, for instance, as well as potatoes, peanut butter, etc, so you'd have to avoid those too).
If the obstructions are due to a motility or functional issue, then eliminating gluten could have some benefit, BUT you would also have to eliminate all other bulking foods from your diet and thus follow a low residue diet. Unless you have proof that gluten-based foods are causing too great a bulking or constipating effect, I really don't see how eliminating it will have any significant impact on your issue. There are perhaps other (contested) benefits from avoiding gluten, but I doubt forgoing it entirely will prevent future obstructions.