Can a greasy chain cause the chain to come off the rings?
No.  A greasy chain won't cause the chain to pop off, and it would have to be exceptionally dirty for dirt to cause this.  (I've ridden many miles with greasy, dirty chains.)  Generally a chain comes off due to maladjustment or because of a worn component (usually a cog).

Poor technique can contribute to the problem, but the technique either needs to be pretty bad or there needs to be another contributing factor.