They call it the “lights out factory.” A manufacturing complex run by the Japanese company FANUC, it spans 22 facilities producing 23,000 computer parts each month for companies like Tesla and Apple. The plant runs close to 24 hours a day, every day of the year.

WIRED OPINION ABOUT Bill de Blasio is the mayor of New York City and a candidate for the 2020 Democratic presidential nomination.

The complex seems to run so smoothly, it might take a moment to realize that something’s missing: human workers. FANUC’s factory is 100 percent automated, with robots going “unsupervised” by a human for as many as 30 days at a time.

The scale of automation in our economy is increasing far faster than most people realize, and its impact on working people in America and across the world, unless corralled, will be devastating. Already, according to the Brookings Institution, 36 million American jobs are “highly likely” to be automated out of existence in the coming decades.

But automation and human employment should not be viewed as mutually exclusive. America has welcomed technological advancement throughout our history, and we still should, as long as the benefits of these advancements are shared evenly instead of solely going to big corporations.

As mayor of New York, and as a candidate for President focused on the needs of working people, I’ve seen at home and across the country that workers can benefit from these technological changes, but we can’t let American jobs be replaced by them. That’s why I’m proposing a new plan today to protect American workers and ensure that we all share in the gains from technological advancement.

To start, my plan calls for a new federal agency, the Federal Automation and Worker Protection Agency (FAWPA), to oversee automation and safeguard jobs and communities.

FAWPA would create a permitting process for any company seeking to increase automation that would displace workers. Approval of those plans would be conditioned on protecting workers; if their jobs are eliminated through automation, the company would be required to offer their workers new jobs with equal pay, or a severance package in line with their tenure at the company.

Additionally, my plan would close tax loopholes worth hundreds of billions of dollars for corporations that invest in automation and then often deduct it on their taxes, even if they know that their “investment” will likely destroy their employees’ jobs.

Lastly, my proposal would institute a “robot tax” on large companies that eliminate jobs through increased automation and fail to provide adequate replacement jobs. They’d be required to pay five years of payroll taxes up front for each employee eliminated. That revenue would go right into a new generation of labor-intensive, high-employment infrastructure projects and new jobs in areas such as health care and green energy that would provide new employment. Displaced workers would be guaranteed new jobs created in these fields at comparable salaries.

Automation and human employment should not be viewed as mutually exclusive.

This tax, and the jobs in 21st century fields that it creates, would drastically change what the next economy will look like for working people. It’ll have two fundamental effects that would guarantee that American workers have a shield against unemployment.

First, my plan would ensure stability for the workers who have the jobs of today. Secondly, by taking the revenues created by closing the automation loophole and the “robot tax” and investing them in new programs, it would facilitate the next generation of jobs—good-paying union jobs in green energy, early childhood education, home health care, and the like. For generations, Americans went to work confident not just that they had the security of a good-paying job with union benefits, but that they’d have that security for years to come. Those of them still in the workforce—as well as Generation X and Millennials—deserve that same peace of mind.

To deal with this looming threat, some tech leaders in Silicon Valley, and my fellow 2020 candidate Andrew Yang, have proposed providing every American with a Universal Basic Income (UBI) of $12,000 a year. While this idea could be part of a broader solution, as a standalone proposal it’s woefully inadequate and has the potential to do more harm than good.