Termination for convenience is a standard term in contracts, hence well-understood by corporate lawyers. The repayment could be reduced using a depreciation schedule so the longer the device is in your hands the less that's returned.
I think this would work. The legal machinery is already there. The market would work out the details.