When my state was debating creating a state-run lottery to fund education projects, my preacher gave a sermon on the evils of gambling. Religions can't realistically stay out of politics because every law can be reinterpreted as a moral argument.
I think that was the previous posters point - any teaching on a moral issue will ultimately have overlap with real world issues.
A homily about gambling would be right in line with religious teachings - the timing is really what is at the apex of your post.
That's fine. It's different when it's telling people how to vote.
Some people buy lottery tickets specifically because of who they benefit, which is very different than going to Vegas or certain forms of investment. (IE, uneducated investment is often just gambling.)