Inside a grade II-listed aircraft hangar a five-minute taxi ride from the centre of the sleepy Kent town of Rochester, tech-geeks are building and testing helmets that help to take down enemy planes, pirates and soldiers with utmost precision.

The hangar's shell has not changed since it housed four-engined heavy bombers in the Second World War, but underneath is a breathtakingly advanced, slightly oddball manufacturing centre.

Air in the clean rooms is triple-filtered; lasers measure every lump and bump of the pilot's head to ensure a perfect fit, so that if someone else takes a liking to the helmet they will soon find themselves in extreme pain; and one very mad-looking fellow, who bears a remarkable resemblance to Back to the Future's Doc Brown, is rushing around in shorts beneath his thigh-length, static-free, white lab coat.

Britain does not do heavy manufacturing on an industrial scale anymore. Back in the late 19th century half the planet's commercial ship tonnage was produced in the UK.

However, as cheaper manufacturing centres have emerged, the UK's defence industry has moved from being dependant on huge ironworks to relying on big-brained boffins in super-advanced labs.

BAE Systems has been criticised for making thousands of redundancies from Somerset to Yorkshire and faces the prospect of closing Portsmouth Dockyard when the £5bn super-carrier warships programme comes to an end in the next few years.

But companies such as the FTSE 100 giant, which employs around 1,500 on this Rochester electronic systems site, are world leaders in hi-tech defence products. The defence industry now accounts for 10 per cent of the UK's high technology manufacturing and is the leading exporter in Europe.

The UK's expertise in this area is a result of the country's propensity for war. Britain is the third-biggest purchaser of defence equipment behind the US and China, and, according to Oxford Economics, the sector supports 314,000 jobs and generated £22.1bn of sales in 2010.

As the equipment improves, so exports boom. From this base, for example, £126m of equipment is sold around the world, while BAE spends £95m a year on research and product development here to ensure that the optical technology stays ahead of its rivals.

What's striking is that nearly a third of the staff at Rochester came through as apprentices, a high number given how out-of-fashion such schemes became as the UK snubbed industry for financial services during the Eighties and Nineties.

Gary Dawson, the site's apprentice training manager, said: "Our parents probably scared their kids off [apprenticeships] because of their experiences, like being made redundant, but we've hopefully come out of that attitude now. The successful candidates for our apprenticeship scheme for September now have pages and pages of As and Bs at GCSE."

Manufacturing is trendy again, and there were 312 applications for just 12 places last year, with people as old as 26 putting forward their CVs, an unthinkable age just a few years ago.

In the past, the catchment area for applicants was no more than 15 miles, yet now there are apprentices from as far afield as Blackburn and Cornwall.

The way hi-tech defence contracts work also provides a degree of job certainty, so that even if there are likely to be redundancies, they will take place years ahead when long-term contracts start to dwindle. And they also know that they will come through the apprenticeship with very impressive skills – at least they should do, given that about £73,000 is typically spent on each of them during the course of their training programme.

Tony Boarer, BAE's helmet-mounted display project director, said: "The manufacturing environment here today is the result of contracts that have been in place for two to five years. This is not like other industries, where if people don't buy smartphones suddenly, you react quickly and stop manufacturing them."

Now, what about those helmets? Even the most avowed pacifist would surely get excited sitting in the onsite simulator while wearing the Striker headgear, which allows pilots to identify targets anywhere around the plane. If the bogey is out of sight underneath the RAF Typhoon aircraft, all the pilot has to do is look down towards his or her lap and the visor will visualise the target on a green display in the visor. Rather than turn to face the enemy, the pilot can then just lock on the little green triangle or square that tracks it and then fire.

In dogfight trials in the US, a plane using the helmet took down an opponent not using it 20 times for each occasion it was defeated, making the headgear and its technology good value at an estimated £200,000 a pop.

That avowed pacifist might also take a little succour from the fact that, since December, the technology has allowed craft to fire on ground military targets based in civilian areas of Afghanistan with far greater precision, so avoiding what BAE staffers describe as "collateral damage" – loss of innocent lives.

However, they would probably be a little less impressed with the big gun near the simulators and the monocle-like device that means the rear door gunner doesn't have to stick their head out of a helicopter to spot a target and shoot. Instead, they can sit an arm's length into the chopper and aim through the information that appears in the display. The Royal Navy has taken 11 of them for its anti-piracy campaigns.

Similar optical technology is being developed for Lockheed Martin and the US's F-35 jet. BAE originally lost out on the contract to introduce sophisticated sighting helmets for the aircraft in 2005. But the winner, a US joint venture called Vision Systems International (VSI), has developed a flawed concept where the display cannot keep up with the pilot's head movements. BAE was asked to bring in its mounted display system last year, with first delivery expected in 2013, while VSI fixes those problems.

Alan Jowett, fast-jet business development lead at BAE, said: "They've been struggling to get their technology going, whereas we have already gone through that pain. There are lots of opportunities now for our technology."

The obvious opportunity for defence manufacturers is to transfer what they develop in the military field for commercial use. The avionics part of BAE has done well through the global downturn as it drew up a strategy about five years ago to grow this part of the business.

"We went through a period when we were really just a manufacturing centre," said Nigel Wright, who holds the rather convoluted-sounding title of commercial avionics solutions programme director.

"We spent time looking at where to go next, taking us into business jets and regional transport. If you look at the commercial market and see the number of aeroplanes needed over the next 10-15 years you can see that this will be a very important business for us."

BAE has been doing particularly well in Brazil and is also trying to crack China, where something of an aviation boom is under way. The Chinese are also an obvious threat to British manufacturing, with costs of production far cheaper than in the UK.

However, the Rochester bunch all argue that while the Chinese engineers' textbook skills are unquestionable, they lack the experience in this type of market to become world-beaters in the short-term.

Taking another look around the hangar, it is noticeable that the staff vary in age from late teens to engineers and scientists well into their fifties.

There's enough experience here that can be passed on to the younger generation, though perhaps the apprentices should avoid taking fashion tips from the wild-haired, shorts-wearing Doc Brown wannabe.

Fighting talk: The cost of defence

£39.5bn Ministry of Defence spending, over half with British industry.*

4th highest area of government expenditure, behind work & pensions, health and education.

£14bn spent by the MoD on buying new and maintaining old equipment.

4.3% defence inflation — highest since records began in 2005/06.

6400 contracts placed by MoD.

4% of worldwide military spending is accounted for by the UK in 2010.

* all figures 2010-11 unless otherwise indicated.