I think the problem people have with the lottery isn't directed at the middle class person buying a lottery ticket here and there. It's more that the whole system is designed to encourage already vulnerable people to risk somewhat significant portions of their weekly take home on the extremely unlikely chance of winning, and then doing this week in and week out. $2/$3 for a Powerball, maybe a state lotto ticket, then a few scratch offs, and ATM fees to get the cash for all this, and poof you've spent $10-$20+, when you're living on less than $300 a week.
I'm not saying don't buy a lottery ticket here and there if you truly get some enjoyment out of it, but the lottery system as it is now seems to encourage borderline gambling addiction behaviors in people who are the least likely to be able to resist them.
Spain in the 19th century tried to avoid that by massively increasing the ticket price (even now, it's still 200€ per full ticket). It didn't work, people just pooled their money and bought "shares" of a ticket.
I'm not saying don't buy a lottery ticket here and there if you truly get some enjoyment out of it, but the lottery system as it is now seems to encourage borderline gambling addiction behaviors in people who are the least likely to be able to resist them.