Inside Tesla’s Fremont factory, six red robot arms bob and weave over a small piece of silver metal that will soon become part of a Model 3 sedan.

A clear plexiglass wall separates them from any humans who might be nearby. Most of the time, however, no one is. Even in a factory that employs 10,000 people.

The arms perform their tightly choreographed work, then pass the part on to another station, where another set of robots takes over. Meanwhile, an elevated conveyor line slowly moves partially assembled car bodies overhead.

Since CEO Elon Musk delivered the first electric Model 3 sedans at a party behind the factory last July, the company has struggled to rev up production of the car, considered the key to Tesla’s financial success. Musk has blamed the delays, at least in part, on over-automation, saying Tesla at first tried to use robots for many tasks that are better handled by humans.

Now Tesla has finally reached its goal of building 5,000 Model 3s per week, and the production line — opened up for a tour to The Chronicle this week — is humming. And while Musk has talked about re-introducing humans into the Model 3 process, it remains heavily, strikingly automated.

It is, in fact, quite different from the separate production line that builds Tesla’s Model S sedan and Model X SUV elsewhere in the factory, where employees in black shirts and baseball caps swarm over car bodies carried on robotic carts. So pronounced is the contrast, it feels as if Tesla has crammed together two factories under one roof.

“One of the challenges we had was to reduce human intervention as much as possible,” said Charles Mwangi, Tesla’s director of body engineering, his voice nearly drowned out by the Model 3 body line’s constant whirrs and piercing beeps.

Musk has for years described his vision for the future of auto production as “the machine that builds the machine,” an expression memorialized on T-shirts worn by some of the factory workers. And to tour the Model 3 body line does indeed feel like walking through an immense machine that may be supervised by humans but doesn’t need their constant input.

Robots from suppliers Kuka and Fanuc — 1,028 machines in all — spin parts, screw in bolts and weld, sparks flying behind the plexiglass. Flashing red and yellow lights at each work station will signal when a particular robot requires maintenance, while a green light indicates smooth operation. Meanwhile, there’s almost as much activity — again, automated — happening overhead as there is on the floor.

“You pay for space in cubic feet — you might as well use it,” Mwangi said.

He joined Tesla in 2012, when the company released the Model S. At the time, Tesla occupied just a corner of an otherwise empty factory, formerly the home of New United Motor Manufacturing Inc., or NUMMI.

By the time Tesla was gearing up for the Model 3, the factory was no longer empty. Designing the machine to build the machine, and fitting it into the limited space available, required extensive planning.

“We used a lot of simulation, 3-D simulation, but we had to get it right before we built it,” Mwangi said.

In its drive to hit the 5,000-car-per-week target, originally forecast to happen last year, Tesla also had to improvise. In June, it erected an immense tent next to the factory to handle some of the Model 3 assembly tasks. The Chronicle’s tour of Model 3 production this week did not include the tent.

The Model 3 production process is not fully automated.

Even sophisticated industrial robots, for example, can have trouble manipulating flexible parts, like wires. Musk talked this spring about how Tesla had tried to use a “flufferbot” to place a fluffy fiberglass mat on top of car battery packs. It didn’t work — not reliably, anyway — and gummed up what should have been a quick, simple step.

“Machines are not good at picking up pieces of fluff,” Musk said. “Hands are way better at doing that.”

So the robots in the Model 3 production process do leave some tasks to humans. On a mezzanine near the heart of the plant, robots lift and “marry” the underside of the car — which contains the electric vehicle’s long, flat battery pack — to the body, a step that can be risky for people, considering the weight of the pack. Once the parts are married, however, humans attach the brake cables, a job that requires dextrous fingers.

Although the automation is intended to speed up production, and help Tesla become a true mass-market automaker, it also may reduce the risk of injury to workers.

Employees trying to unionize the factory have complained for years about injuries at the plant, and a workplace safety group issued a report last year saying that the plant had far higher injury rates than the auto industry’s average.

Laurie Shelby, Tesla’s vice president of environmental health and safety, said the company’s accident rate this year is about 10 percent lower than last year’s, and the rate of severe injuries has fallen 20 percent. Injuries related to repetitive motions and stress, which automation can help avoid, account for about 75 percent of injuries at the plant, she said.

“It’ll definitely help ergonomically, for sure,” Shelby said. “But you still have people working with the automation.”

As it ironed out problems in the process, Tesla has repeatedly shut down Model 3 production this year to make tweaks before cranking up again. Chris Moral, a quality engineering technician on the Model 3, said the quality of the cars has increased over time.

“It’s definitely improved since we started,” he said, at a safety fair for workers outside the factory. “All around, really — paint quality, the way the body fits. So we’re definitely on an upswing.”

Moral, 34, used to work at the plant in its NUMMI days, and he said the changes, including the automation, are remarkable.

“It’s definitely different — it’s an eye-opener,” Moral said. “But this is 2018, and it’s Silicon Valley.”

David R. Baker is a San Francisco Chronicle staff writer. Email: dbaker@sfchronicle.com Twitter: @DavidBakerSF