This is what I did once. And it worked!
I have a 4 years 1 day old repo for code that was used in a job 4 years ago.
But I made sure to have a written agreement saying that the code I was bringing in was, within reasonable limits, still mine.
Clearly this doesn't include code that was produced during the job.