Late morning, and the suffocating heat of Costa Rica's rainy season has turned the air over the plantation leaden. On the horizon, where the spikes of thousands of pineapple plants merge into a grey-green fog, sits a spraying machine. Settled and silent for now, like a giant stinging insect that has briefly come to land, its long stick arms are folded back above its head while the belly of the tank on the trailer behind it, marked with a skull and crossbones warning, is being refilled with its next toxic load. Then the whine starts up again, the arms unfold, the spray nozzles open and it sets off towards us.

Alongside me, Fernando Ramirez, leading agronomist at the National University's toxic substances institute, is explaining the agrochemical cycle required to produce perfect luxury fruit from a tropical monoculture. "Pineapples need very large amounts of pesticides, about 20kg of active ingredient per hectare per cycle. The soil is sterilised; biodiversity is eliminated. Fourteen to 16 different types of treatment are typically needed, and many have to be applied several times. They use chemicals that are dangerous for the environment and human health." The chemicals involved are legal in Costa Rica but include some of the most controversial in the world.

This intensive agriculture has delivered cheap pineapples and created a new market. Global production has risen by nearly 50% since 1998. Two US-based multinationals, Del Monte and Dole, dominate the trade, and three-quarters of the pineapples on European shop shelves now come from Costa Rica. Two years ago, the fruit became even cheaper, when it became the focus of a price war. Go into any supermarket today and you can see "half price" and "two for the price of one" offers on boxes of pineapples.

But this is an industry built on environmental degradation and poverty wages. Moreover, price cuts appear to have led to an immediate, sometimes brutal deterioration in conditions that were already poor. On a visit to Costa Rica in June to make a documentary with funding from Consumers International, I heard repeated allegations of chemical contamination, wage cuts, union-breaking involving mass sackings and accidental poisonings.

Like many other local experts, Ramirez, who is the country's coordinator for the Pesticide Action Network, fears that the pineapple boom has outpaced the government's ability to regulate it. "The fight now is against pineapples because there's been an explosion in production, but it's difficult because the owners of the plantations have very big political and economic influence."

By now, the sprayer was bearing down on us and we reached for our masks. Then, out of nowhere, an armed guard rode up on his motorbike to inspect us. Costa Rica, with a population of just over 4m, has only 12,000 or so policemen and no army, but an estimated 17,000 gun-carrying security guards employed by private companies. We were standing resolutely on one of the many roads that are public rights of way but run right through the plantations. Across the road, a gang of a dozen or so workers who had been slumped, sweat-drenched, by a bank, snatching their day's half-hour break, pulled themselves up, slung machetes over their shoulders and clambered on to the back of another trailer heading off to a picking area. The 12-hour piece-rate harvesting shift still had a long time to go. The guard talked urgently down his walkie-talkie to base, glared at us, then rode off in a cloud of red dust.

Ramirez continued describing his concerns. "Some of the plantations have used paraquat, for example, to clear the soil at very, very high doses, 10 to 15 times the normal dose on other crops; it's banned in Europe. They use lots of herbicides because the EU will not allow even one weed in a container of imports. This is absolute monoculture, and that and the climate provide the perfect conditions for pests and diseases. They use organophosphates, organochlorines, hormone disruptors, chemicals that are known to cause cancer, chemicals that are reproductive toxins [cause birth defects]… Many are highly toxic, some are persistent pollutants."

In its most recent tests on pineapples imported from Costa Rica, the UK government's pesticide residues committee found 94% of samples contained residues of the fungicide triadimefon, a reproductive toxin and suspected hormone disruptor. None was above the legal limits, however, and the committee concluded they would not be expected to have an effect on consumer health. Other experts take the view that we should reduce our exposure to residues of this sort as much as possible, especially among vulnerable groups such as pregnant women and children.

The main burden of this constant agrochemical assault falls not on affluent western consumers, however, but on Costa Ricans – 90 complaints about public water relating to 19 pineapple companies are currently before the country's environmental court, including some against the biggest producers. One involves the community of El Cairo, which sits below two vast plantations in Costa Rica's Atlantic region, Hacienda Ojo de Agua and Finca Babilonia. The former is contracted to supply pineapples to Del Monte; the latter has been directly owned by Del Monte since 2008.

For more than three years, the residents here and in neighbouring villages – around 6,000 people in total – have had to collect their drinking water from a tanker because the ground water has been declared unsafe. Tests showed it was contaminated with agrochemicals used in pineapple production, including ones linked with cancer and that disrupt hormone systems.

When she had finished hauling buckets home in the tropical heat, one of the community leaders, Aydee Quiroz Nunez, told us how the local water crisis had begun. She first suspected a problem in 1995, when her family's health deteriorated dramatically after they moved to the village. Then growing numbers of locals began reporting unexplained illnesses – diarrhoea, rashes, gastric problems, including vomiting blood, pains in bones and headaches, loss of vision. Ramirez's university colleagues tested the water, and the tests were then verified by international labs.

Eventually, 10 years later, the government accepted that residues of 22 agrochemicals could be detected in the drinking water, among them bromacil, a herbicide linked with cancer of the thyroid, liver and kidneys. Finally, in 2007, the authorities agreed to send in water by tanker. But deliveries can be erratic and are insufficient. When we visited, Nunez and her neighbours had been waiting four days for the tanker to arrive. Most residents still rely on the contaminated piped water for washing and, if they are out when the tanker does show up, for drinking water, too. Many complained of serious health problems.

"I now have many chronic illnesses, and so do my children," Nunez told us. "It's not fair what's happening to us." She broke down in tears as she explained how their campaign to get back decent water had been greeted by officials. "The government has labelled us communists for this. The reality is many people are sick because of pineapples. We are not communists."

We asked the owners of Hacienda Ojo de Agua and Del Monte to comment on the water contamination next to their plantations. The Hacienda did not respond, although it has in the past told local press that it hasn't broken any laws. Del Monte said the government was monitoring the situation and that it had stopped using bromacil on its own farm nearby when it bought it in 2008. Del Monte added that it did not use any pesticides banned by the US or the EU, and that it closely managed pesticide use on its contracted farms.

Pineapples were worth $700m to the Costa Rican economy in 2009. The sector currently employs around 25,500 workers directly and accounts for a further 100,000 jobs indirectly. In the eyes of the government, the multinationals and principal aid donor the US, the industry represents a much-needed opportunity for Costa Rica to develop.

But as with so much globalised, liberalised food production today, the new jobs created are "flexible" and conditions often so tough that they are filled not by locals but by Nicaraguan migrants. Approximately 60% of workers in the Costa Rican pineapple industry are Nicaraguan, rising to 90% in the Atlantic and northern growing regions. Many of the migrants are without proper papers and therefore struggle to assert their rights.

We met a group of them who work on a large plantation owned by Grupo Acon, a major supplier to Dole, Fyffes, Tesco and Walmart-Asda. Pineapple price wars in western supermarkets meant only one thing for them: "Our wages have been slashed. We are in crisis. It's nowhere near enough to cover our living costs. We are even struggling to pay for water," one of the workers told us. The group alleged that the company had nearly halved their pay in recent months, saying it had no choice because of falling prices in Europe.

At peak harvest times, the work is long and arduous, both in the field and in the pack houses that run 24/7. Pablo Lopez Garcia from Nicaragua had worked seven days a week for more than three weeks when we caught up with him on his first day off in a month. A member of the plantation workers' union Sitrap, he had recently been persuading fellow workers to petition the company for independent union representation on its "permanent committee" that handles relations between employees and management. But everyone who had signed the petition had just been sacked, he told us. In 2007, there was a mass sacking, or "liquidaciones", and rehiring at wage rates reportedly 40% lower than previously. Union members were rehired only if they agreed to give up their affiliation, we were told.

Victor Louis Espinoza, also from Nicaragua, had been in Costa Rica for six years, sending money home when he could to his wife and child so she could go to school, but his pay had been nearly halved in recent months and, despite working six or seven days a week, 12 hours a day, he said he could barely survive now. He joined the union three years ago, having suffered health problems as a chemical sprayer, in particular after using an organophosphate insecticide called diazinon. "We used to have headaches, skin burns, nausea. They stopped using that after we complained, but we still get rashes sometimes from different chemicals." Approval for diazinon, mostly used as a sheep-dip in the UK, was revoked in this country in 1999 and its use in agriculture phased out from that date. Grupo Acon stopped using it a year ago.

Espinoza was longing to go home, and described a future that seemed to him without hope. "They say the cuts are market pressures and we just have to accept it. I miss my family, of course – it's really difficult to get permission for a holiday long enough to travel all the way back to Nicaragua."

We put details of these allegations to Grupo Acon for comment. It failed to respond before our film was completed, but later told us that strict protocols are in place to deal with any chemical accidents, and are followed. Dole declined to comment on conditions at its supplier. Asda currently takes pineapples from Grupo Acon via Fyffes. Fyffes said it had checked in audits and was satisfied its suppliers had an open attitude to trades unions and and did not refuse to hire union members. Tesco, meanwhile, told us it was actively engaged in improving conditions. "Tesco always looks to ensure high ethical standards among its suppliers. After two years working with suppliers in Costa Rica, we have brokered an agreement to invite independent labour experts to review labour practices and identify ways to strengthen them. That project is under way and is examining issues including pay, labour relations, seasonal labour and health and safety."

The Costa Rican fruit industry has a long record of hostility to independent unions, born of its geographical position and the political history of Central America, according to Carlos Arguedas, environment and health officer for Sitrap. He is based in Siquirres, one of the featureless towns that has grown up in the pineapple frontier. As a young man, he was one of the many chemical sprayers made sterile by the notorious pesticide DBCP when he worked on Dole banana plantations. (As compensation for being made infertile, he told us he received $7,500 from the company.) He has been jailed 23 times for union activism and confrontations that have arisen from it.

As a veteran of union campaigns, Arguedas was familiar with the "communist" label thrown at those, like Aydee Nunez in El Cairo, who confront the powerful interests in the international fruit trade. He explained some of the history. Export-led growth is part of a new vision for Costa Rica promoted by US Aid from the early 80s under the American Public Law 480 "food for peace" programme. After a debt crisis, a World Bank study recommended a restructuring of the economy with a liberalisation of markets and a shift to more food for export to the US and EU, in exchange for cheap imports of US maize, beans and rice. The US gave millions in soft loans to implement it. The policies also created opportunities for US-based trading companies to expand in the region. Cold war politics were a powerful force at the time, and the US was keen to support governments in its backyard against what it saw as socialist and communist tendencies. It was alarmed by the wave of strikes and violent outbreaks on what were then heavily unionised banana plantations on the Pacific coast. It found a willing ally in this geopolitical game in the Catholic church under its Polish, anti-communist pope, John Paul II.

The legacy today is an antipathy to the unions.Arguedas agreed to be our guide in the flatlands of the northern Atlantic region, where there were reports of union repression. In contrast to the rolling hills of the rainforested tourist north, this is a bleak, agri-industrial landscape in which miles of banana, in blue plastic insecticide bags, give way to miles of pineapple. The humidity is intense, and the settlement we were visiting seemed not even to merit a proper name. It was simply called Agriportica – Agriculture for Tica [Costa Rica]. Del Monte has two huge pineapple plantations here.

Workers were too frightened to be identified, but we gathered more evidence here of mass sackings and allegations of union-breaking at Del Monte's Finca San Peter at the end of last year. We were told a few workers tried to join the union to demand higher pay, and after some had been poisoned while spraying pineapples with Furadan – one of the most toxic carbamate pesticides, not approved for crop use in the EU. Carbamates are nerve poisons. The company reaction was "like a bomb going off", one worker said. It was alleged that first members were intimidated and threatened. I was shown a notice that was then put up in the plantation office announcing that all field workers, around 300 people, would be sacked in a mass "liquidacion" and rehiring on 7 November. The workers were rehired on slightly poorer conditions than before, with the exception of union members.

Didier Leiton, the local Sitrap organiser, took up the story for workers who felt unable to speak openly. (Like Arguedas, he had in his youth been a sprayer on banana plantations and was made sterile by DBCP.) "They were offered free transport to Siquirres town to renounce their union membership. Those who accepted the offer were rehired; those who did not were not." One who refused to leave the union found his house burned down shortly after. Leiton suspects it was arson, though there has been no formal investigation. He was himself beaten up one night on his way home from union work on a separately-owned plantation.

We put detailed allegations to Del Monte about incidents at San Peter and two other cases, similar in scale and nature, related to us by workers, of alleged mass sackings and union-busting, chemical accidents and violence against union organisers on Del Monte-owned or Del Monte-supplying pineapple plantations in Costa Rica. The company did not respond to our specific allegations, but said in a statement that strict controls and rigorous good practice had enabled it to keep accidents to a minimum. It added that freedom of association was a fundamental right for all its employees, many of whom belonged to unions. In Costa Rica, the vast majority of its farm employees chose to be represented by permanent committees, it said.

These committees are controversial. Many workers told us they didn't feel they represented workers' interests and were manipulated by managements. According to the independent unions, they are part of a new structure for industrial relations put in place by the fruit companies when they moved to the Atlantic zone in the 80s and designed to keep free unions out. The structure includes the Solidarista Associations which are part of a movement promoted by an institution within the Costa Rican Catholic church. Multinational fruit companies have paid this Catholic "escuela", or school, to produce anti-union literature and films to show workers on plantations. These alternative structures for labour relations got off to a flying start with a $1.5m cheque from the US embassy.

There are other ways to farm pineapples. While in Costa Rica, we met a leading fairtrade and organic farmer, Mainor Soto Castro, who works his own land with his family in the northern region. He told us he had switched out of conventional production when his family kept becoming ill from the chemicals they had to apply. Instead, he now controls pests by rotating crops and building up the health of the soil, and therefore the ability of the plants to resist them. He was prospering, in part thanks to the extra premium paid to him for fairtrade. But the association that markets his fruit told us its fairtrade pineapple business as a whole was in crisis. With prices of conventional pineapple being slashed across Europe, demand for the more expensive fairtrade fruit had fallen dramatically. People who might be prepared to pay an extra 50p for more ethical production were put off when the price difference was £1 or more. Three-quarters of its fairtrade pineapples were finding no market and were no longer actually sold as such, but were sold as though they were conventionally grown, so the farmers were receiving no premium for them.

As we drove away from the Finca San Peter, we passed one of the signs you frequently see at the entrance to plantations, often alongside a warning not to enter because agrochemicals have recently been applied: "Thanks to Solidarista, 250 workers toil here in peace and harmony with employers. Solidarismo = Peace." According to Arguedas, the result of "employers and workers toiling in harmony thanks to solidarismo" is a distribution of money from the pineapple trade as unequal as the burden of its environmental impacts.

Consumers International research has found that of every pound you spend on pineapple in the shop, retailers typically take 41p, multinational traders 38p and plantation owners 17p; where the multinational traders also own the plantations, they get 55p. Workers typically receive just 4p.

"All the pineapple production has done is generate money for the multinational companies' foreign bank accounts," Arguedas told us. "Here it only pays wages too low for people to live on and destroys our environment. This is not development. If anything, it is going backwards."

The less people pay in Europe, the higher the price, it seems, they have to pay in Costa Rica.

See Felicity Lawrence's film about pineapples, directed by Tom Pearson, at theguardian.com/video. Additional reporting and translation: Sam Jones.

• This article was amended on 11 November 2011 to correct a link to the appropriate Del Monte website.