Hi @gidon,
Here you find a TEAL example to securely handle ASA Opt-In in Stateless ASC1.
The ASC1 allow Opt-In transactions for a specific Asset ID submitted whitn a certain block, so nobody can burn Smart Contract funds with Opt-In after that block.