What cause ammonia stink? Pee. Well, urine – whatever name you call it. Add time to pee and bacteria (bacteria is everywhere and not avoidable) and you get ammonia.
Ammonia is made from the breakdown of protein. Our kidneys turn it into urea and we safely pee it out. So, it's there in the pee in form of urea. When the urine is on the fabric in the diaper pail, (or even on baby overnight), it chemically changes as it breaks down. The result is ammonia stink. Keeping bacteria counts in the diaper down will help keep the overnight stink down, as will breathable covers (wool) since they allow more air and keep the temperature cooler. In the diaper pail, air circulation helps decrease stink (seems counter-intuitive but makes sense).
In the old days, people dunked each diaper in the toilet to rinse it out. This worked really well - before the 1995 toilet regulations began that require new toilets to have low water flushes. Less water in the toilet makes dunking less practical. But now we have diaper sprayers. Yay for sprayers! If you spray out the pee before putting the diaper in the pail - voila! almost no ammonia stink since the pee is mostly gone. Who knew?
Ok, so ammonia is there because pee is there. Now, what to do about it? Well, what is ammonia? pH 7 is neutral. Ammonia is high pH. Acid is low pH. Ammonia is a weak base - high pH. It's caustic and thus if you have ammoniacal diapers you get an overall red tone to the skin which is a burn, much like sunburn (which is why vitamin E helps that). Vinegar is an acid. The gallon jugs we buy are usually diluted to pH 6 (acidic is a pH lower than neutral 7 - remember science class). What a great word: "ammoniacal".
To get rid of ammonia, soak overnight in water and add some vinegar to bring the pH of the water down. This will dilute the stuff stuck in the diapers and it will wash out better. Time + dilution.
Bacteria can be an issue also. Perhaps a disinfection with oxygen cleaner is enough to take care of the bacteria. Rinse well. What not to do: Some will add vitamin C to water to get ammonia out (which also works to neutralize bleach) and that works but it's not recommended. Vitamin C is pH 2 (very acidic!) so that can burn fabric and elastics easily thus we can't recommend that. It's too hard to control the pH and too low a pH can acid-destruct washing machine parts and hoses too, so please don’t do that.
Bleaching to fix ammonia? Well, bleaching will help with getting rid of bacteria. I'm suggesting that more dilution and a lower pH of water is a first step. Bleach is high pH. Ammonia is high pH. Detergent is high pH. So bleach plus ammonia is just more high pH stuff. This is why babies get burned bottoms after bleaching when bleach is not rinsed out enough. After bleaching, rewash with oxygen cleaner or hydrogen peroxide if you are having trouble getting bleach out. That neutralizes bleach. But that too is high pH, so then rinse that out also - I digress. Bleach is tough on fabrics too. Detergent is necessarily high pH, so for a tough ammonia problem, more high pH stuff is ok but only ~meh~ for a serious ammonia problem.
I'm a fan of using some vinegar and soaking in water. Water alone is fine if you are worried about the acidity of vinegar. Give the diapers some time in the water to soak. Real soaking. Pause the cycle and let it sit for a few hours. I'm also a fan of dunking or spraying off diapers after each use to prolong the fabric's life expectancy. This usually isn't needed for a young baby, but for an older baby eating table food who makes stronger pee, it is very helpful. Sometimes it helps to just spray or dunk out particularly strong diapers, such as nap and night diapers. Needs vary.
Dilution is the solution to pollution.
"Stew" does not give you dilution. All that rubbing from grinding the diapers against each other in a stew-consistency wash load can cause premature wear on natural fibers. Proper agitation is of course needed, but enough water is needed too.
Burnt casserole dish? Soak it in water in the sink overnight and what happens? It cleans up much more easily after some time in water! Water is a pretty cool and powerful thing!
Address an ammonia issue with a water soak first and things will wash out more easily. Note that bathtub soaking is a drowning hazard and is never recommended. I know this is quite different than other suggestions online. What is your experience on this? These are my ideas and not rules. What do you think?