Re wearing Tefillin and refraining from passing flatulence.
Is a distinction to be made between faltulence that has a bad odour and flatulence that does not.
There is no distinction made by poskim concerning the odor of flatulence. Any passing of flatulence is considered a “guf she’eino naki”–an ‘unclean’ body, and one must refrain from passing any flatulence while wearing Tefillin.
See Shulchan Aruch, Orach Chaim 37:2; Mishnah Berurah 25:55, concerning many who do not wear Tefillin for a length period (or all day) for fear of this.