Exchange>> Your wallet >> gambling website.
It could help minimize the risk, but it’s still not completely safe. If the exchange is checking where the money is coming from, they might trace all the sources, and with personal wallets, it’s easier to link previous transactions. I don’t know, but it still feels risky to me. The best way to really handle this is through a mixer or CoinJoin for better privacy.