If you own and run an S-Corporation you are supposed to pay yourself a reasonable salary.
Granted the IRS does not define reasonable salary, but there should be a salary.
I work with a client whose son-in-law is retired and receives no Social Security, he had run his own business.
The only way we could not pay into social security and not collect is to have been an S- Corp owner. Sole proprietor or LLC you are subject to self-employment tax on all profits. A C-Corp only allows removal of funds as salary or dividends.
So, he had to be an S-Corp owner who never took a salary and spent all distributions. Over the years I have heard of others in the same situation. Never a client, I would not let them do this to themselves.
My understanding is to get Social Security you need to have 40 quarters with payments into Social Security. In HS and College, I had something like 28 quarters paid in.
The Service is cracking down on this abuse, I agree with this to an extent. Some people need to be forced to plan for their futures.