From what I can tell, staking is literally not any safer than normal trading is. In fact, trading may actually be safer because the volume of trades is much greater than the volume of stakes, and imbalanced stake amounts are probably even more noticeable to Jagex. I loan my friends valuable items pretty frequently through trade, and a large volume trade could easily be a loan (whereas a duel could not be).
To respond to the question in the OP, you'd have to do something really stupid to get banned no matter how the gold is transferred. It's highly unlikely. Botting, on the other hand, can get you smacked instantly (especially on an e-mail login), so be careful with your gold once you have it.