Sometimes I think luck is a place of mental peace because when we lose most of the time we blame luck similarly if we win, it is because of luck (in most time betting /gambling). In fact what should your own feeling be? This question may seem to most of us gamblers that if an experienced gambler loses the same way, then how is it possible to identify the main algorithm of gambling?
I think the answer to this question may be easy or it may be very difficult, but the secret between us continuing to gamble and winning or losing is a manifestation of the latent state between the developer and gamblers like us, winning or losing.
You've left out entirely a major aspect to luck versus skill. Not all gambling or casino games are one in the same. There's a big difference between playing say black jack than there is in playing slot machines. Games like black jack, poker and roulette all take a level of skill and know how and while luck is certainly a factor, skill is also a major player when it comes to being good at these games. So luck wont cover it. However if you're just playing slot machines lets say, than yes, it's 100% luck driven.