Last week, Apple reported one of the most amazing earning results in corporate history. During the last three months of 2011, the company made $13 billion in profit—more than twice as much as it earned during the same period in 2010, and more than just about any company has ever earned during a single financial quarter. (The exception: Exxon Mobil’s third quarter in 2008, when it made $14.83 billion thanks to high oil prices.) Apple’s earnings brim with incredible factoids. It made more in profit than Google made in revenue. Apple’s revenue on the iPhone alone exceeded Microsoft’s revenue from all its operations, and its likely profits on the iPhone—estimated to be nearly $9 billion—topped overall profits from Google, Microsoft, IBM, Intel, and nearly every other company in the world.

Yet when I posted several of these nuggets on Twitter and Facebook last week, there was only one thing folks wanted to talk about: the people in China who work day and night to make Apple’s beautiful baubles, and who get so little of Apple’s cash in return.

Apple’s production practices have been a subject of consternation for several years. In 2010, after a spate of suicides at Foxconn, Apple’s primary manufacturing contractor, I argued that all of Apple’s customers bear a moral responsibility to push the company to improve its working practices. In the last few weeks, two journalistic accounts have brought renewed attention to Apple’s factories. First, This American Life featured an excerpt from monologist Mike Daisey’s play The Agony and the Ecstasy of Steve Jobs, which includes an extended look into the miseries of the people who make your iPhones and iPads. Then, last week, the New York Times published two deeply investigated accounts of Apple’s production facilities. The reports—which told of punishing workloads, instances of toxic exposure to hazardous materials, the hiring of under-age workers, “involuntary labor,” and the falsification of records—did not reflect well on Apple. The company, the investigation suggested, has done a great deal over the last few years to improve its practices. Still, when working conditions are pitted against the bottom line, it always chooses profits over people.

It’s time for Apple to change that. CEO Tim Cook should launch a long-term plan to completely remake Chinese contract manufacturing—a plan that improves factory conditions, raises wages, and, over the long run, reduces the number of workers needed to make electronics. He should do so publicly, telling the world exactly what’s wrong with how we make gadgets now, and how Apple plans to fix the system. And he should do so with the same commitment to excellence that Apple brings to its products—setting high standards, and meting out severe punishment for contractors who fail to meet them.

Why should Apple revolutionize electronics manufacturing? Not just because it’s the right thing to do—even a company as successful as Apple can’t afford to spend billions just to make itself feel better. The more pressing problem is its image; if Apple ignores this problem, the specter of “conflict iPhones” is going to swallow its brand. While there is no evidence to suggest that Apple’s factories are any worse than those of its competitors—in fact, many of them use the same contractors to make their devices—no company benefits more from low-cost Chinese labor than Apple. If it continues to deliver monster earnings, scrutiny of its factories isn’t going to stop.

What’s more, Apple is in a unique position to change how the world’s gadgets are made. It alone can risk reducing earnings over the short run in exchange for a long-term improvement in the conditions at its plants. Apple has almost $100 billion in cash, and it has frequently used its holdings on strategic investments that pay off over time (for instance, buying up the world’s supply of touch-screen panels). Apple’s brand image is core to its success. Millions of people around the world believe that no other company is smarter about improving our gadgets. If that perception keeps getting challenged by reports from Apple’s dark underbelly, many of its customers might rightly wonder whether the iPhone is really worthy of their continued affection. Not to mention their money.

Let’s say Apple decides to take on this problem. What can it do to improve conditions at its plants? Despite its size, Apple is in some ways just as constrained by the realities of global manufacturing as any of its competitors. The Times makes clear that even if Apple were prepared to spend a lot more to make its gadgets, it couldn’t move its facilities to the United States, as many politicians would love for it to do. Indeed, it would be as unthinkable for Apple to move its factories out of China as it would be for it to move its headquarters out of Silicon Valley—only in China are there enough workers, enough suppliers, and enough flexibility in the production processes to satisfy Apple’s awesome scale and speed. (The Times says that Apple once estimated that in the United States, it would have taken nine months to recruit the 8,700 industrial engineers needed to oversee production of the iPhone. In China, that recruiting took 15 days.)

At the same time, it’s clear that Apple could do a lot more to improve its factories than it is doing now. Every year since 2007, it has conducted in-depth audits of its contractors’ facilities, and every year, it’s found a string of violations of its own standards. And what does it do about those violations? From all outward appearances, pretty much nothing. “Non-compliance is tolerated, as long as the suppliers promise to try harder next time,” one former executive told the Times. “If we meant business, core violations would disappear.”

Last week, 9To5Mac obtained a letter that Cook sent to employees in response to the Times series. He denied turning “a blind eye” to problems, and said he was “outraged” by the accusations that Apple doesn’t care about its workers. But he did not elaborate on the central problem chronicled by the Times: Why Apple, with all its money and power over suppliers, hasn’t forced them to change their ways.

But merely improving working conditions is only a short-term fix. The larger problem for the tech industry is that, in terms of human toil, today’s manufacturing methods are unsustainable. There are 200,000 people on the iPhone assembly line alone. The work is dull, repetitive, dangerous, and low-paying. In response to scandals, Foxconn has raised wages several times over the past few years. As the demand for mobile devices increases, Apple and other computer makers will need many more such workers—but as China’s economy grows and the price of labor soars, finding people to fill these mind-numbing jobs will become increasingly difficult.

Foxconn’s executives have suggested that their long-term goal is to get humans out of the process completely. By 2013, the company plans to install a million robots at its plants, and as industrial artificial intelligence improves, it will surely rely more on machines than men and women. Foxconn has even researched the possibility of building fully automated factories—places where machines crank out other machines without any human help.

With its vast resources, Apple could speed up this trend by investing billions in robotic factories. This, of course, raises another ethical dilemma—is it really humane to replace human workers with machines? As awful as working conditions at Foxconn might seem to Americans, the jobs are prized in China. If pushing for improved conditions results in more automation—and, thus, fewer jobs—are we really doing those workers a favor?

In many ways, that question is moot. Foxconn’s efforts to automate its factories suggest that the way we make iPhones today isn’t going to continue indefinitely—that all those production jobs are bound to become extinct soon anyway. Apple would be wise to invest in that future. When your iPad is made by a robot, you’ll finally have nothing to feel guilty about.