Yes, but the cash that is hoarded by companies or paid out to stock owners don't end up under the mattresses. They go into the banking system, and from there new loans are made. It might not be the company reinvesting the money themselves. But someone else will borrow the money from the banks and do it.
Now we hear that banks aren't lending much to businesses now. That's true, because they are lending tons of money to the government (by buying treasuries) and because the Fed is printing money to pay these banks interest so that the banks will keep the money with the Fed.