Wages depend directly on the supply of and demand for labor, and only indirectly on the amount of value produced in an hour of labor. So if assembly line workers notice that coders are making tons of money, and so the assembly line workers move en masse away from assembly line work toward technical careers, then the factory owners would have to compensate the remaining assembly line workers higher since there is no longer a ready supply of competent labor ready to replace them. It would not even have to be that assembly line workers switch careers, just that the number of new workers entering the field declines as young people choose other, more lucrative career paths.
Unfortunately, it is quite difficult to make your way into a technical career without a significant investment in education and (I would argue) a certain personality type. So we aren't seeing thousands of people moving away from low-skill jobs into technical careers. The supply of labor for jobs like "warehouse worker" simply hasn't declined enough to offset the decline in demand (due to increased automation, outsourcing, structural changes, or whatever). The result is that those workers see lower wages. At the same time, compensation in technical careers seems a bit ridiculous: $200k to write Python for 35 hours a week? I've heard numbers like that thrown around - but companies still complain of a lack of qualified workers for those roles.
This is all just to say that the owners of capital aren't going to pass excess profits on to labor out of the goodness of their hearts, just as labor isn't going to work harder than the bare minimum required to keep getting their paycheck. But they might be forced to pay higher wages if they can't find good workers. If the structure of the economy changes so that some sectors are more productive, then the supply and demand of labor should shift to keep things from getting out of whack. That hasn't been happening in recent decades.