Gambling does not equal spewing your money @dice and roulette.
Can it be profitable long term? Sure.
Lets say you flip a coin with your friend, and every time he wins - you pay him 1$, but if you win - he pays you 1$ and 10 cents. Does that qualify as gambling? Yes - there is a a) wager with a something of value 2) even with the uncertain outcome 3) prize
Why will it be profitable for you longterm in that example? Because odds are on your side.
So yes, certain types of gambling can be profitable longterm
Yes you can if the house edge is positive but your example doesnt exist in the world of gambling, house always have the edge on them to make sure you dont win in long term. In flip a coin game, each time you win you get 0.98 $ back and each time you lose you pay 1 % so in long run you will keep losing