One way to protect your self is with a written contract between you two.
But best is if you can somehow have a control of the website in case they do not pay.
Maybe you can encrypt all of the code and make the site render useless if they do not pay.
What’s more important is how would you take advantage of retaining the copyright? Sue them for copyright infringement?
I would suggest scrutinizing your business process and coming up with solutions that don’t rely on a threat of a copyright infringement lawsuit. Signing a good agreement in the beginning of your contract is usually sufficient to ensure that the client pays - also, should things go sour, that agreement would be a much better basis for a breach-of-contract lawsuit than a copyright infringement threat.