It was Jean Claude Latife's childhood dream to become a vet. "I simply loved animals. I wanted to help them and make sure they lived the longest time possible," he says. And for 25 years he did just that. But then he also fell in love with the southwest of England. So did his wife and children. He was looking for an easier life and he knew that meant avoiding the night call-outs and heavier work associated with being a regular vet.

Instead he settled for work in an abattoir. This might seem odd: if you love animals, why would you want to usher them to their death? But Latife was adamant (and remains so) that the vet fulfils a vital role at the slaughterhouse. "I was there to stop animals suffering. Maybe I will attend to the last minutes of their life. Unloading, stunning, all these events in the abattoir that I can make less painful for the animals." Everything he did in the abattoir he felt was entirely consistent with the veterinary equivalent of the Hippocratic oath that he had sworn solemnly years before. It includes the line: "My constant endeavour will be to ensure the health and welfare of animals committed to my care."

"Surrounded by death, noise, shit and concrete," Latife quickly realised he also needed to develop a thick skin. The pressure in the abattoir to get orders out was relentless, but he often brought proceedings to a standstill when he saw rule violations. He was there to safeguard animal and public health and he took that seriously. However, his production line colleagues did not take stoppage time sanguinely. Particularly the slaughtermen who were being paid by the kill.

One day, 10 minutes before lunch, he stopped the line again. Two pigs were touching, which is strictly prohibited, as one could contaminate the other. According to Latife he was confronted by two violent slaughtermen, one fresh out of prison, who he alleges was high on drugs, and one with a police record. Rather than his being subjected to the usual verbal taunts and abuse, this time a knife was held to his throat. Latife left and never returned to the abattoir.

Latife's experience was something that really shouldn't happen to a vet. I suspect we still think of a vet as a James Herriot. I know I did. When James "Alf" Wright began writing fictionalised accounts of his work as a vet in Yorkshire during the 40s and 50s someone described it as if "God's own PR company" had been handed the account for the veterinary profession. We were told that vets were heroic, selfless safeguarders of animal rights, preferred real farm work to small animal practice (James never had much time for the hypochondriac lapdog Tricky Woo) and spent a lot of time in mad pursuit of Yorkshire farmers who had little intention of paying their bill. That image of the vet has endured, even though it turns out Herriot is about as relevant to modern practice as Mr Chips is to teaching.

‘Vets have become complicit in a system that is inherently bad for animal welfare’: pig carcasses hanging in an English abattoir. Photograph: John Eveson/Rex

I head to post-Christmas Godalming, where the fields are still full of water, to the offices of Compassion in World Farming (CiWF), the organisation set up by dairy farmer Peter Roberts in 1967 to safeguard the welfare of farm animals. Today it is headed by Philip Lymbery, and he is the definition of sincerity as he talks rapidly, letting at least two cups of coffee go cold. The organisation is vehemently opposed to industrial farming, which it alleges compromises animal welfare. Since Roberts's time the industry has grown massively – around 70bn farm animals are produced worldwide every year, and two-thirds are factory-farmed. And Lymbery is very concerned about the UK veterinary profession's part in this. His book, Farmageddon: The True Cost of Cheap Meat, written with political columnist Isabel Oakeshott, is billed as a wake-up call to the perils of industrial agriculture and devotes a whole chapter to these fears. Animal care: what happened to the vet?

"Vets have become complicit in supporting a system that is inherently bad for animal welfare," Lymbery explains. "These systems include the mass production of broiler chickens, caged production of eggs, the large-scale permanent housing of dairy cows (so-called mega dairies) and highly intensive pig production where mothering pigs are kept in confinement where they can't turn around for weeks at a time."

It is not that he's accusing vets of perpetrating acts of cruelty or negligence, but rather that they see farmers rather than animals as their clients, and in order to keep those clients will put up and shut up rather than properly addressing animal welfare.

"They're working in a system that has an inbuilt flaw," Lymbery says. "For example, so many animals are crammed into one space, causing disease. But instead of the vet saying: 'Use a different agricultural system, a pasture-based one', antibiotics are used prophylactically to tackle the disease and keep the animal alive and growing."

Whichever way you look at it, industrial farming takes an unremittingly pragmatic view of animals. According to Lymbery it treats them solely as units of production, keeping them alive and growing rather than seeing them as individual sentient beings capable of pain and suffering. This leads to a technical interpretation of "welfare".

All creatures great and small: Christopher Timothy as James Herriot in the much-loved television series. Photograph: Allstar/BBC

"The psychological wellbeing of animals is very important," he says. "Chickens must be able to flap their wings; pigs need to root in the ground." These natural behaviours are called the Five Freedoms, and welfare campaigners say they are compromised in industrial systems.

Lymbery hasn't so much had bust-ups with the veterinary establishment ("the high priests of the livestock industry", as he calls them), as fairly low-key disagreements at conferences and award ceremonies, where their paths might cross. Behind the scenes he claims CiWF is actually a refuge for disaffected vets who are upset that their ethics are being compromised or disillusioned by giving out medication instead of treating animals. A number of CiWF's staff, notably the influential director of public affairs Dil Peeling, are former vets. Lymbery says he sees far more engagement and progress on welfare from McDonald's and Waitrose than vets and farmers. He seems exasperated that the veterinary profession isn't taking a stand on industrial systems.

Five years after his ordeal Latife, now a veterinary advisor outside the UK, is still angry and thinks vets here should stand up and be counted. "We need to correct things; we need a revolution in the profession and strong action. Even vets who are in charge of controlling the legislation are under so much pressure that they are complicit rather than speaking out."

"The general public looks on vets as custodians of animal welfare," stresses Lymbery. "They would be intensely disappointed in a profession that accepts and works in and with industrialised systems without criticism."

Meanwhile a recent industry-sector pay review suggested that remuneration is well below that of GPs, and wages all but stagnant and falling for non-farm vets. Through my conversations with working farm vets, I found professionals who were affable though guarded and insistent that they made no concessions on animal welfare. In fact, as predicted, it was difficult to find anyone who would speak out against industrial-farming systems. But whether that's because everyone's happy or everyone's scared stiff of upsetting the apple cart is difficult to determine.

All the vets I spoke to were in clear agreement: the job has changed beyond all recognition over the past two decades. John Blackwell, president elect of the British Veterinary Association (BVA), confirms that the Herriot days are over. Qualifying in 1985, he now works in a mixed practice on the borders of Wales and Shropshire, specialising in farm work. "In the old days every day would be different. A bit like Herriot: you'd wait for the phone to ring and it was firefighting and rescuing animals with pneumonia, for example. Now we've moved away from chocolate-box farms with 30 cows tied by the neck and farmers eking a living. Where I am we're looking after a reduced number of farms holding more stock, say 400 to 500 cattle."

But Blackwell sees the evolution of the vet's relationship with farmers as no bad thing. "Now we're an integrated part of the farm, part of the overall management team, working with nutritional advisors and foot trimmers on a herd healthcare plan, using preventative medicine. We're taking on much more of a consultancy role." It sounds like he's working with a Premiership football team.

Chris Tufnell, council member of the Royal College of Veterinary Surgeons, warns against romanticising animals kept on pasture or "knee-deep in cow shit" on small farms where there are often equally institutionalised welfare issues. What motivates today's vets is the chance to use the breadth of their scientific training. "If some vets coming into the profession have any negative opinion of organic systems, for example, it's likely to be based on the stringent rules about medications you can and can't use to comply with organic. What vets like is that they have clinical freedom to make decisions on an animal's welfare."

Can we count on the next generation to stand by their ethics? Times are tough, and inevitably these highly trained scientists want more bang for their buck. "Are there going to be those pure clinical jobs in the future?" asks Blackwell somewhat rhetorically. "We're going to see more of an integration into allied scientific roles, whether they be in the food sector or the pharmaceutical industry."

That's potentially bad news for those who want vets to remain independent custodians of animal welfare. "Back in the day there were a lot of people who were happy to go into the profession because it was a vocation," says Tufnell. "Today you have to achieve really high academic results, and a lot of graduates want more from their profession. When it comes to paying the bills, you can see why moving into industry might be seen as a better package than a practice working 24/7."

Goodbye James Herriot. We'll miss you.

To order Farmageddon: The True Cost of Cheap Meat by Philip Lymbery (Bloomsbury, £12.99) for £10.39, with free UK p&p, go to theguardian.com/bookshop