You are right to be cautious on this. Anything you and your in-laws arrange will have complications and such...so if you decide to do this GET EVERYTHING IN WRITING.
Create an agreement that works for all parties, spell out all responsibilities (financial and otherwise) and lay out a contingency plan if one of the parties dies, decides to move, divorces, becomes disabled, etc.
Then (wait for it) PUT IT IN WRITING and have everyone sign it. You'll be glad you did.