No it's not. Buying a bunch of Apple stock for $1 apiece doesn't prevent anyone else from buying Apple stock too. Buying and squatting on domains prevents people from using the domains. It's strictly rent-seeking behavior and is not productive in the least.
Stock is fungible. Domain names aren't. If I buy stock, as long as there continues to be sellers (and there will be for any functioning stock) you can buy stock too and the only effect my purchase can possibly have is, if I bought enough, it might affect the price you pay. If I buy a domain name, you cannot buy that same domain name too.