What you need is a system where everyone is required by law to behave in a way that benefits the society.
That’s not feasible, but it’s probably feasible to require everyone to act in a way that doesn’t hurt society, and make restitution when they do hurt society.
For example, I’m okay with gambling in games being legal, but there needs to be rules:
no kids
pay into a fund to help those with addiction
odds of winning are clearly posted in a way that’s accessible and understandable, and the odds are verified independently
there should be a way to buy something instead of gambling for it
must have a way to set spending limits to protect drunk gamblers
That’s not feasible, but it’s probably feasible to require everyone to act in a way that doesn’t hurt society, and make restitution when they do hurt society.
For example, I’m okay with gambling in games being legal, but there needs to be rules: