Definitely rinsing/washing out with cold water as much as you can before it goes into the nappy bucket & into the wash works wonders for avoiding stains... as I've recently found out
I've got one nappy that I didn't do this too and 4 washes later, it's finally starting to fade, despite time on the line in the (limited amount of) sun. All the rest, the ones that I rinsed under the tap, have been fine, not a stain in sight.
I really must get a nail brush or something though. Up until now, I've been using my fingers/finger nails to rub the nappy under the tap to get the poo stains out!