There is no doubt that many of the people on SS and Medicare are receiving more than they put in. I don't know what definition you're using for the word welfare but I'm going with the Oxford dictionary
welfare: definition of welfare in Oxford dictionary (American English) (US)
Note how that definition doesn't distinguish between programs where the recipients contribute to it, and even if you do, the fact is the poor pay taxes too.
Also, there is no functional difference between collecting taxes and then sending a portion back or instead just reducing the tax in the first place with a deduction or credit. People who own homes get a mortgage deduction. People who do not, don't get that deduction. It's "welfare" for homeowners, pure and simple. The only argument for the deduction is that the people are somehow "deserving"
It is clear that, in each and every case, what has been classified as "welfare" has been singled out to portray the recipients as poor, lazy, and undeserving, even though (as Karl's posts demonstrate) the vast majority of the recipients either do work (and contribute tax money to the govt) or are children, seniors, disabled or otherwise unable to work.
IOW, it's not that I'm moving the goalposts; I'm just pointing out the political "dog whistle" that the term "welfare" is. It's an artificial construct designed to distinguish govt programs that help poor people from those that help everyone else (including businesses). If poor people get it, it's "welfare"; Otherwise, it's something else that's not "welfare". In fact, your own definition of "welfare" (ie programs the recipients don't pay into (even if they do)) demonstrates this. After all, they're poor right? So how can they afford to pay into it?
The thing is, just like the other "non-welfare" programs mentioned, many of the recipients *have* paid into and many have not