It wouldn't do that. But even if it did do that, this would not be a good thing.
The majority of leverage (debt) in the stock market is not people making wild bets, its just basic functions from institutions.
But even if we narrow the definition to the boogeyman image you have in your head about "leverage," if you remove it you've just made the market radically less responsive to information and arbitraging prices nearly impossible, and ultimately the economy less efficient in broad strokes.
You'll say "fine, who cares cause it'll stop [insert historical bubble example], and also I saw a reddit comment that said all economists are dumb!"
But most people have no idea how big a role leverage (aka debt) plays in just the basic functioning of the capital markets.
Putting a brake on the market might also sound good to you in theory. But the stock market is how the most important capital flows through the private economy, slowing this down is defacto slowing down the economy. Most people don't understand what slower economic growth means for your quality of life over the long term. Just 1-2% slower growth than the average, and the US's entire system collapses in 15 years (France is currently dealing with this reality in slow motion, their debt is now rated worse than Greek debt).
An easier example to understand: a pie that isn't growing is a zero sum pie. Ambition in a zero-sum world requires violence.