I think it actually depends on what type of infection you have as to whether or not excessive oxygen in your headspace will allow certain bacteria to affect your beer. Pediococcus and the majority of lacto strains are anaerobic, so if you have a lacto or pedio infection due to insufficient sanitation, then it doesn't matter if you have oxygen present or not, since the lacto and pedio don't need it to produce lactic acid. The oxygen stimulates the formation of a pellicle (that film you have on top of your wort) in order to slow down the penetration of oxygen into the wort (since they're anaerobic). But even in the absence of oxygen and the associated pellicle, the lacto and pedio will produce lactic acid. This is why I can age my oud bruin for 1 yr+ in a rigorously purged carboy with minimal head space and I don't get a pellicle, but I get a nice clean sourness from lactic acid production.
If, on the other hand, you've acquired acetobacter at some point in time, oxygen is definitely important. The acetobacter will produce acetic acid (mmm...vinegar), but only in the presence of oxygen. So in this case, limiting oxygen in the headspace is critical to avoiding spoiling your beer.
I agree with Yooper that in general it is best to avoid having a lot of headspace if you don't purge that headspace to get rid of oxygen. However, I follow this protocol mainly to avoid potential off flavors from oxidation and the muting of hop flavor and aroma that can arise from too much oxygen in the headspace. I would actually think your infection arises primarily from sanitation, so as Yooper said, rigorously cleaning any and all equipment should be your first step. I would say your second step should be replacing any plastic/rubber parts that you are currently using since these parts can get scratched, giving bacteria a place to live even after you think you've sanitized well.
You can still secondary with a lot of headspace if you are good about purging that headspace with an inert gas like CO2 or nitrogen. If you keg, this is really easy b/c you can simply use a keg gas line. You can also use CO2 or N2 cartridges that you get for inflating tires, etc. So these are options when you end up wanting/needing to secondary for a long time but have a lot of headspace. I do this frequently.