Bread flour has more gluten, which is a protein that makes bread stretchy and less crumbly when the dough is prepared right. There is plenty of whole wheat bread flour out there, and you can often get mixes which are specifically made for bread machines, I'd start with those and see how you go. If you cannot find them in your local store you might be able to find them online.
You can also read the label on the back of the flour, higher protein flours generally mean they have more gluten. You can sometimes find non-bread flours that have almost as much protein as those marketed as bread flours, so next time you are at the store have a look.
Because nothing else is affected, your red onions probably acquired the mold spores before you purchased them. Perhaps they were stored in a humid area that facilitated the rapid growth.
Hopefully, you didn't store them in the refrigerator. Onions should be stored in a dry area of your kitchen or pantry in a manner that allows for good air circulation. Use a wicker or wire basket rather than than a plastic container.
I see a big red flag in your mentioning storing potatoes in the same container. Potatoes should never be stored in proximity with onions because onions give off a gas which will cause potatoes to spoil. Keep your potatoes in a separate area, preferably dark, and which also permits air to freely circulate.
Regarding what to do with the moldy onions now: wash off the mold and allow the onions to dry, and/or cook with them as soon as possible. After peeling off the outer skins, if the flesh of the onion looks good, with no mold or dark spoiled areas, then I think they'll be safe to use.
If you have too many onions to cook right away and are afraid the mold will progress, slice and/or dice the onions as desired, and blanch them in some boiling water. Then, seal the blanched onions tightly in one or more packages for freezing.
Best Answer
The mold is growing and producing that smell. Mold spores form on ALL bread when it is exposed to air. That's why it takes a few days for the mold to actually be visible. The mold doesn't just instantly grow, it "forms" over a few days and when enough of it accumulates, you see it.
Bread with preservatives, have a longer shelf life because they contain a mold inhibitor. After the expiration date on the bread, that "inhibitor" will no longer keep the mold from "blooming" and it will rapidly appear and multiply.
If the bread smells bad/moldy, DO NOT eat it! You can get sick on moldy bread.
My daughter(we) did a Science Fair Project on Mold Growth in Bread and this was some of the information we found.
Hope this answers your question.
An added note: Storing sealed bread in the Refrigerator does NOT extend the expiration date.