There's really only one way to protect yourself from being ripped off as a writer: never even schedule a project (let alone actually write it) until it's paid in full. No exceptions.

Tell your prospective clients that they can try you out for a very short project or just pay you for the first few pages (or one small section) of a larger project before they trust you with a larger payment in advance. If they wait until the very last minute to order a much bigger project, they don't have those options but don't let anybody try to make that your problem because it isn't.
I always tell them there's no pressure whatsoever to use me and that if prepayment in full is a problem, maybe they should just try me another time when they have a shorter project and/or a longer deadline. I'd rather just pass on a project than ever write anything that I can't be sure will be paid.
Clients can always mitigate their risk of getting ripped off by trying out any new writer or essay company with just a few pages, but if they insist on receiving the work before it's paid in full, they're pretty much excluding the most experienced writers who already have way too much regular work to bother taking any risk whatsoever about being paid for their work.
It's the client's prerogative (and their problem) if they're just not comfortable risking prepayment for a couple of pages.
Once you've furnished the work, there's really nothing much you can do to force someone to pay you other than letting them know that whatever they didn't pay for still belongs to you and that you have the right to post it on-line so that it can't really be used without getting flagged by anti-plagiarism scans.