It’s not the $9k deposit that’s illegal, it’s structuring your deposits to avoid the $10k limit. The same actions can be legal or illegal depending on your in intent.
In your example, the $9k deposits are perfectly fine. Although if you really always deposit $9k you’ll probably get some questions.
Are you supposed to risk keeping it on premises until enough adds up, or you should tell the bank to file a CTR, or something else?