A few decades back, when the globalization honchos decided to pack up whole American industries and move them to cheap labor havens in Asia and Mexico, the oligarchs promised that US workers would be retrained for jobs in the new tech industry. Few at that time saw the rise of robots able to replace human workers, but now we are living it.

Thursday’s Wall Street Journal front-paged an article detailing the history of what happened in the tech/employment world, including how few employees are employed in today’s billion-dollar technology companies. It is better researched than many automation stories one sees.

Below, the dispiriting job-loss graph appeared with the Journal’s headline in the paper edition: “Tech Boom Creates Too Few Jobs.”

Of course, the same trends toward utilizing automation in tech are similarly occurring in most other industries, from manufacturing to fast food restaurants.

Unfortunately there’s no mention in the article that as a result of automation, robots and advanced software, America doesn’t need to import immigrant workers for jobs that will soon disappear. In 2013, an Oxford University study was published that concluded nearly half of US employment is at risk of being replaced by smart machines within 20 years. The Gartner tech consultants predicted in 2014 that one-third of jobs will be replaced by automation and software by 2025. The clock is ticking and the machines are getting more capable of replacing humans all the time.

In fact,

Note: I included some of the original links in the story but not all.

The discontent driving Donald Trump’s campaign stems partly from the dashed employment promises of the late 1990s; $7-an-hour robots

The technology revolution has delivered Google searches, Facebook friends, iPhone apps, Twitter rants and shopping for almost anything on Amazon, all in the past decade and a half.

What it hasn’t delivered are many jobs. Google’s Alphabet Inc. and Facebook Inc. had at the end of last year a total of 74,505 employees, about one-third fewer than Microsoft Corp. even though their combined stock-market value is twice as big. Photo-sharing service Instagram had 13 employees when it was acquired for $1 billion by Facebook in 2012.

Hiring in the computer and chip sectors dove after companies shifted hardware production outside the U.S., and the newest tech giants needed relatively few workers. The number of technology startups fizzled. Growth in productivity and wages slowed, and income inequality rose as machines replaced routine, low- and middle-income, human-powered work.

This outcome is a far cry from what many political leaders, tech entrepreneurs and economists predicted about a generation ago. In 2000, President Bill Clinton said in his last State of the Union address: “America will lead the world toward shared peace and prosperity and the far frontiers of science and technology.” His economic team trumpeted “the ferment of rapid technological change” as one of the U.S. economy’s “principal engines” of growth.

The tech-powered disappointment is subtler than the anger caused by the crushing impact of China’s import invasion and the perceived failures of government institutions like the Federal Reserve in guiding the economy. Instead, it stems from the idea that Americans expected larger economic gains from these amazing new machines and the companies that created them, not a widening between the haves and have-nots.

“There is a growing sense of frustration that people haven’t seen the progress that their parents and grandparents did,” says Erik Brynjolfsson, a Massachusetts Institute of Technology economist whose work has chronicled how technology widens the income gap between rich and poor. “That frustration spills into the political arena.”

In 1997, Time magazine named computer-chip maker Intel Corp.’s chief executive, Andrew S. Grove, who died in March 2016, as “Man of the Year.” Amazon.com Inc. CEO Jeff Bezos won in 1999. Companies spent billions of dollars reprogramming their computers for the Year 2000 bug, and profitless dot-com startups won giant valuations from optimistic investors.

The bursting of the dot-com bubble in early 2000, the recession in 2001 and deepening globalization proved to be turning points for the tech economy and its broader impact on American prosperity.

U.S. tech companies accelerated the reshuffling of their supply networks to China and elsewhere in Asia, places filled with growth potential and cheap labor. Hardware makers concentrated production overseas to supply U.S. and foreign computer makers.

After rising through the 1990s, total employment at computer and electronic firms in the U.S. sank to 1.03 million in August 2016 from 1.87 million in 2001, according to Labor Department statistics. Employment at semiconductor makers fell by half to 359,000 in the same period.

In the 1990s, Micron Technology Inc. was a successful example of how far the tech industry reached beyond its nexus in Silicon Valley. Based in Boise, Idaho, Micron was founded by Idaho farmers and businessmen, including the late billionaire J.R. Simplot, who supplied McDonald’s Corp. with most of its frozen french fries and had “MR SPUD” license plates on his pickup truck.

Micron’s workforce quadrupled to 18,800 between 1994 and 2000, with the growth overwhelmingly in the U.S. The company fought with Japan in the 1980s to restrict imported memory chips and protect its U.S. base.

These days, Micron is a case study in how technology companies have exported jobs to other countries. As of 2013, the most recently disclosed data, Micron had 11,300 workers in the U.S., down from 14,000 in 2000. The company’s non-U.S. workforce surged to 19,600, mainly in China and other Asian nations, from 4,800.

Securities filings show that the percentage of employees at Micron who were in the U.S. shrank to 37% from 74% in the same period. The company stopped disclosing the annual percentage in 2014. A Micron spokesman says much of the growth outside the U.S. came from acquisitions.

“What we’re doing is replacing more resources there to support the growing customer base—both the multinationals that are leveraging the low labor-cost areas in China, in particular, as well as the indigenous Chinese manufacturers,” Mike Sadler, Micron’s head of sales, told analysts in 2004. He is now Micron’s strategic chief.

The Semiconductor Industry Association says semiconductors remain a big U.S. business and are America’s third-largest export, trailing cars and aircraft.

Apple Inc. followed a similar path. Co-founder Steve Jobs made it a mission early in his Apple career and after creating NeXT Inc., another computer maker, to revitalize U.S. manufacturing. Macintosh computers rolled off the line at an Apple factory “like a Holiday Inn toaster turns out toasted bagels,” says Brent Schlender, who co-wrote a biography of Mr. Jobs.

By the time Mr. Jobs died in 2011, Apple made nearly every one of its products outside America, largely in Asia. Apple halted U.S. manufacturing in 2004 and didn’t resume until 2013, when it began producing Mac Pro personal computers in Austin, Texas.

Apple says it employs about 80,000 workers in the U.S., or two-thirds of the company’s overall workforce. About half the U.S. employees have retail jobs.

An Apple spokeswoman says it is “creating jobs in new industries like the App Economy,” or apps developed for the iPhone, and is “a major contributor to U.S. manufacturing” by buying American-made components and materials.

Mr. Schlender, the Jobs biographer, says it made sense to assemble the iPod outside the U.S. when production began in 2001. “The components were hard to make, and putting them together was a labor-intensive job because everything was so small,” he says. “You had to piece it together by hand.”

The computer-hardware exodus spread. International Business Machines Corp. , the company that turned computers into a big business, was born in Endicott, N.Y., and built its first factories there.

From 2001 to 2015, though, employment in computer and electronics manufacturing in surrounding Broome County fell about two-thirds to 3,055 jobs. Warehouses and transportation companies scooped up some laid-off workers at salaries of less than half those paid in high-tech manufacturing, says Christian Harris, an analyst for the New York State Department of Labor.

American tech workers are getting a smaller piece of the economic pie created from what they produce. As of 2014, employee compensation in computer and electronic-parts making was equal to 49% of the value of the industry’s output, down from 79% in 1999, according to the Commerce Department.

While other tech jobs have been created in sectors such as software publishing, that growth is smaller than the losses in tech manufacturing.

Since 2002, the number of technology startups has slowed, hurting job creation. In a 2014 study, economists Javier Miranda, John Haltiwanger and Ian Hathaway said the growth of tech startups accelerated to 113,000 in 2001 from 64,000 in 1992.

That number slumped to 79,000 in 2011 and hasn’t recovered, according to the economists’ calculations using updated data. The causes include global competition and increased domestic regulation, says Mr. Haltiwanger, an economics professor at the University of Maryland.

Another problem is that fewer tech companies have gone public, which can enrich early employees and spawn more jobs as companies grow.

Jay Ritter, a professor at the University of Florida’s Warrington College of Business, says there were 548 initial public offerings of technology-related companies from 2001 to 2015. From 1990 to 2000, by contrast, 1,853 went public.

The latest generation of hot tech startups has attracted a mountain of venture-capital funding and gigantic valuations, led by Uber Technologies Inc., which was worth $68 billion as of June.

The influx of wealth has created more prosperity in Silicon Valley but exemplifies the economic polarization rippling through America.

WhatsApp had more than 450 million users world-wide when Facebook bought the messaging service for $19 billion in 2014, turning founder Jan Koum into a billionaire several times over. At the time of the acquisition, WhatsApp had 55 employees.

Economists call the phenomenon “skill-biased technical change.” The spoils of growth go to those few people with skills and luck and who are best positioned to take advantage of new technology.

The five largest U.S.-based technology companies by stock-market value—Apple, Alphabet, Microsoft, Facebook and Oracle Corp. —are worth a combined $1.8 trillion today. That is 80% more than the five largest tech companies in 2000.

Today’s five giants have 22% fewer workers than their predecessors, or a total of 434,505 as of last year, compared with 556,523 at Cisco Systems Inc., Intel, IBM, Oracle and Microsoft in 2000.

Amazon uses 45,000 small robots at about one-third of its U.S. warehouses to automate order processing. The robots look like bread boxes on wheels, lifting modular shelves stuffed with products and carrying the shelves to workers who pick out pieces.

An Amazon spokesman says the company has added about 200,000 employees since it began using the robots in early 2012. Amazon has 268,000 employees world-wide.

Robots aren’t dexterous enough yet to identify different sized-packages, pick the right ones and place them safely in boxes, says Mr. Brynjolfsson, the MIT economist. That is the fundamental skill in warehousing. Researchers now are trying to automate that part of the job, too.

In coming decades, machines are likely to replace new forms of routine work done by humans. From 1991 to 2001, the number of secretaries declined about 35%, according to the Bureau of Labor Statistics. The number of textile and apparel workers fell 37%.

For a long time, those with bachelor’s degrees in science seemed to be safe from automation-related layoffs because their cognitive knowledge was tough for computers to duplicate. Less-educated workers who dispense personal service, such as home health aides or masseuses, also seemed safe.

Harvard University economist David Deming estimates that the hollowing-out of work spread to programmers, librarians and engineers between 2000 and 2012. As much as $2 trillion worth of human economic activity could be automated away using existing technologies, such as Amazon’s robots, in coming years, consulting firm McKinsey & Co. estimates.

Knightscope Inc., based in Mountain View, Calif., makes robots that serve as night watchmen. About three dozen are on patrol, including at shopping malls, corporate campuses such as Microsoft’s in Mountain View and the new home arena of the Sacramento Kings. Knightscope clients pay $7 an hour per robot.

“Robots don’t complain,” says Stacy Stephens, a Knightscope co-founder and vice president of marketing and sales. “There’s no pension. And there’s no worker’s comp,” he adds.

Write to Jon Hilsenrath at jon.hilsenrath@wsj.com and Bob Davis at bob.davis@wsj.com