Most brokerages will offer you a margin loan if you have say $100k of stocks held through them. Not pocket change, but easily available to magnitudes 4-5 on this scale.
The real use of margin is that it enables the holder of the stocks to use them with the broker to take on cash obligations in the form of other stock options, or to take on obligations which require holding certain shares which create cash, such as a short call option.
Most other brokers, even Schwab and Fidelity, will not.
Agree it's probably not a good idea for most people. (I might argue the same for a heloc, depending on what for, what emergency savings, what level of job security, etc)
FWIW my brokerage gives me a margin loan at 4.9% up to 30% of the portfolio. The interest is literally lower than the mortgages I see advertised these days.