Both things people told you describe real practice in different states. Who holds earnest money varies by state, and in some states the buyer's broker or listing broker holds it in a separate trust account (often called an escrow account) while in others it goes to a title or escrow company that isn't the brokerage at all. Where the brokerage does hold it, that money is never the firm's money. It sits in a dedicated account, it can't be mixed with operating funds, and the rules on record keeping and how fast it gets deposited are set by the state real estate commission. Commingling trust money with operating cash is one of the fastest ways a broker loses a license, so a lender looking at a brokerage should treat that account as pass-through and not as an asset.
E&O means errors and omissions insurance. It covers claims that the brokerage or its agents made a mistake in professional work, missed a disclosure, described a property wrong, botched a deadline. It doesn't cover fraud, and it doesn't cover the commission the firm never earned. Cost depends on state, claims history and headcount, and many brokerages bill it back to agents per transaction or as an annual per-agent charge.
The part that matters more for your purpose: the real liability in a brokerage isn't on the balance sheet. Revenue is a share of commissions from agents who are usually independent contractors and can leave with 30 days' notice or less. There's no contracted revenue behind it. Ask any firm you look at for a per-agent production breakdown, because a headcount of 40 where 8 people do 80% of the volume is a very different credit than it looks like on the top line.