Rinse out the garment pretty much immediately and spray generously with Spray N Wash. Use warm water and the most vigorouos wash cycle you've got. I've only had a couple of onesies that I couldn't save.
Warning
No formatter is installed for the format bbhtml
I haven't tried it on poop stains, but OxyClean worked wonders on the year-old coffee stains on our sofa slipcovers (more than once, I set a cup of coffee on the arm of the couch only to knock it over and have it spill down the side of the slipcover. The white slipcover.). FWIW!
Re: Poop stains