It's a common misconception that the stock speculation bought on leverage was the cause of the depression. Indeed, margin calls caused automatic stock sales to cover the leverage, forcing stock prices down.
However, the cascade of bank failures occurred due to due to defaulting agricultural loans. The loans' refinancing requests were suddenly refused when European powers pulled currency out of U.S. banks in order to pay their war debts and reparations.
The stock market crash was not the cause of the depression; just one of many larger factors that precipitated it.
I didn't distinguish between borrowing for stocks and borrowing for agriculture. I see both as elements of the unsustainable debt buildup. I view the stock market crash as a symptom of the unsustainable debt, not as a cause.