Neha,
Primarily, the deduction is illegal. Under the Payment of Wages Act (and in the new Code on Wages Act), you cannot make such arbitrary deductions, even if the employee agrees. The deductions are specified under sections 6 and 7, and you can only deduct what falls under that category. If you can put it under one of those categories, then you can deduct it.
The fact that you are contributing an equal amount is immaterial if the employee does not get the money. So, this clause would be allowed if you were not forfeiting the money if he does not work for 18 months. Even if you were not forfeiting the amount, it would still not be allowed as the ₹1,000 would be an illegal deduction.
If you still want to do it, put it under CTC but do not put it under gross wages. Instead, lower his actual salary by ₹1,000 a month and give the full ₹36,000 as a retention bonus at the end of 18 months.
@Dinesh Sir, I hope you agree with this.