Overproduction uses up resources and floods the markets with cheap goods. It becomes a vicious cycle. As the resources get used up production cost increase. But prices keep falling because demand has been saturated. As a result production stops when prices get to low.
The cycle deepens at that point to what we call a depression. Workers are laid off and farmers loose their land. Debts go unpaid and banks have to close. People lose their savings and there is even less money to buy the surpluses stuffing the warehouses.
The only thing that can be done is increase employment and raise wage levels. Enough demand has to be created so that industry can retool and begin production in areas where there are new markets.
At first this was done with the "New Deal". Government spending into infrastructure created jobs and resources for new industrial growth. Programs like Social Security, banking regulations, and unemployment insurance helped stabilize incomes and protect savings. Legalization of unions greatly increased incomes.
Some say this wasn't enough and the depression wasn't going away. But, that's academic. Government spending did end the depression when WWII started. It was the perfect depression crusher. There was no danger of overproduction, most of the stuff was being destroyed as fast as it was being produces. Same for unemployment, men were being killed as fast as they could enlist or be drafted.
We haven't completely resolved things. The overproduction/recession cycle still goes on. Resources are being used up and the environment is being destroyed. Spending on infrastructure and war are still used to keep the recessions from becoming depressions. This spending produces enormous debts and no one really has an answer for what to do about that. The Socialist answer is to prevent overproduction but I'm not sure if that can be done peacefull