This is unabashedly revisionist. Look at what labor unions did throughout the first half of the 20th century. They went to great lengths to ensure that their members could access the privileges of the upper capitalist classes by explicitly oppressing other groups of people - black workers, east Asians, south Asians, Mexicans, and Puerto Ricans. They fought to deport legal immigrants and migrant works. They fought to inter (poor) Japanese-Americans in camps in order to free up jobs for their relatively well-off, white members. After the war, they fought to prevent Japanese-Americans from returning to their homes. The immigration quotas that people oftentimes complain about on Hacker News? Those quotas were originally written to appease labor unions in the first place. The disaster in Puerto Rico? Labor unions opposed allowing foreign relief ships to temporarily service Puerto Rico, which has been standard practice for every single hurricane since Katrina, because they wanted to protect US members' paychecks.
If you want to cherry-pick some good things labor unions have fought for, fine, but don't portray them as the antagonist of capitalist class structure. Labor unions have always thrived on class inequality; their goal is simply to make sure that their members are on the "right" side of it.