Now, in contract to lease where you write the broker names holding the deposit it might be a good idea to right the following (upon acceptance). Then you will only collect the deposit funds if the contract to lease is fully executed.
FYI for compliance if you receive a check in your hands you must give it to your broker immediately. What I like to do is have the tenant write the check and stay in possession of it and send a photo copy (done easily via txt message) with contract to show good faith. Then I only collect the deposits if and when the contact is fully executed.
I understand as Miller explained, brokers do not want to deal with escrow, then, you move to an office that can comply if you wish to pursue rentals or refer the business.
Trust me when I tell you renters will walk on you, some listing agents will let it slide, NOT ALL!
More and more brokerages don't want to handle rental deposits that have to be escrowed, preferring that the owner of the property deals with deposits directly. In my opinion, best practice would be to have the lease deposit go directly to the owner or management company.
In answer to your question, I would never give a penny of my client's $$$ to the other side unless we have fully executed (acceptance) contracts by all parties, and each party has received a copy, too (very important). If you do enough of these, they become very second-nature.
That said, the best way to do the deposit is at lease signing after agreements have been reached and the tenant(s) have been screened and credit checked (there is a fee, usually $50.00 for each person over 18 to be living in the house).
My tenants usually pay their rents and deposits at the same time. The Security deposit has to be paid with a separate check because it goes into an escrow account and cannot be co-mingled with the owner's funds or the brokerage's funds. (Applies to licensees and non-licensees equally).
I like to get my checks a week before the move in date so I can be sure they clear.