Yes zip ties work. So does mechanics wire. Even a rope jammed between the last cog and the spokes will sometimes work. After I mentioned it to a forum member his gave out in the cold. He used the wire taken out of a spiral binder to wire the spokes to the cogs. If I remember right he rode most of the way home and then absentmindedly tried to coast and broke the wire.
It's not complicated, carry a bunch of large zip ties so you can ride home if it fails. Lots of people have done this.