Looking at how much damage gambling debts cause in Asia, I believe it’s pretty reasonable to just ban lootboxes. Both in video games and the sort of gambling that Temu offers.
This kind of behavior is explicitly forbidden by market authorities.
I don't see any reason why we should allow it, or why consumers would be better off with this gamification.
This has nothing to do with freedom to do whatever you want, but everything with a seller which is doing everything it can to confuse buyers. A market needs rules. And we should not allow a seller to determine all the rules.