This is not the first time that I read the analogy between infinite scrolling and slots, and it makes sense because the dopamine argument you've mentioned, because they both are designed to catch your attention and encourage obsessive behaviour.
It's obvious that engaging in these two activities in excess is unhealthy, but answering the question about which one is worse is not an easy task. On one hand, you can lose money in slots, a lot of money if you develop an addiction, which doesn't happen with social media. But while you scroll, the platform learns from you, and you also get manipulated by the platform, which doesn't happen if you gamble.
So, I think that although the downside of gambling is clear, the dangers of infinite scrolling are more subtle, but also deeper, and we don't know yet the future impact it can have in our society and in our lives.