Unfortunately, no.
My understanding is that pyometra has nothing to do with a "clean environment," but more to do with hormonal fluctuations in the bitch which create the haven for bacteria. Thus it is an anomaly within the bitch.
The number 1 thing you can do to prevent pyometra in a bitch you want to keep is spay. Yet even that doesn't work 100% of the time as "what's left" of the reproductive area can still get infected (albeit, it's much less likely to do so). The next best thing is what you did: breed the bitch. My understanding is breeding the bitch changes the hormone cycle and it is what is recommended be done with pyometra bitches left intact: breed them till not needed, then spay.
Obviously, putting a bitch down is the most expedient way to never have to deal with that problem again.
Jack