Waste liquid containing
salmonella and e-coli was found at a recycling site near Chepstow, a court heard.
The black liquid, known as leachate, also ran off the Wormtech site in Caerwent despite warnings from the Environment Agency.
The company's former managing director Jacqueline Powell is standing trial charged with one count of consenting or conniving as a director of a company in the commission of an offence and three counts of failing to comply with a condition of an environmental permit.
Powell, of Manor Way, Cardiff, told Cardiff Crown Court on Monday (20th January) that leachate continued to leak from the site despite being given years to fix the problem by the Environment Agency.
Powell said the company did not keep up with repairs fast enough, despite bunds built to keep liquid on the site constantly being damaged by JCBs.
Timothy Evans, prosecuting on behalf of the agency, said: "You were getting millions – £1.8million in 2011/12 – but weren't intending to reinvest any of that to put in proper structures because you knew you were leaving the site anyway."
Powell labelled the accusation "totally untrue" but admitted "we never got it totally right, but we did try."
She blamed a lack of money and restrictions in place on the site, which was owned by the Ministry of Defence.
"In an ideal world I would have knocked it down and built a perfect site," she said.
"We did our best, it wasn't good enough as it turns out. We were on a site that really was not fit for purpose."
Asked if the site's failings were her fault she said: "As much me as anyone else, it's not as if I was the only person who knew about it."
Mr Evans asked Powell why liquid containing salmonella and e-coli was found near a lagoon dug to contain leachate and outside buildings where composting took place.
She said it was a combination of rainwater coming off a nearby hill and leachate leaking out the back of the building, and admitted the bacterias should not have been present in piles of compost.
Last week, the trial heard evidence from David Jones, a water pollution expert, who said leachate had leaked from the lagoon into a nearby drainage ditch.
Earlier in the trial, Kelly Jarman, a permit regulator for the Environment Agency, said the site was the worst she had visited.
The trial continues.