I’m not sure why an entire agreement is needed. Isn’t it a pretty simple transaction? The buyer sends you a check and you tell the domain registrar the buyer can have the domain.
If you really think there could be some liability down the road, I guess you could say:
In return for consideration of $______ , Seller agrees to take all necessary steps to transfer ownership of _____.com to Buyer. Buyer agrees to indemnify and hold harmless Seller from all future claims of liability or infringement related to the registration or use of this domain name.
That kind of change and you’re asking a message board?
a) talk to a real lawyer
b) most domain registerys deal with this everyday and likely have boilerplate available for when a domain changes hand for any consideration
c) you choose to transfer it - it becomes the other persons, how could there be a ‘new’ claim on it that could come back to you? This is not real estate or even a physical thing.