Here is the process I used for product marketing websites, which could be adapted for this. We always had some where else for the folks to go, ie new product that replaces it, support site for the folks that still on it. Product marketing and sales have a date where they start to communicate that this will no longer be sold or updated. Put that message with links to replacement and support on the main page for the product. Once the day arrives, remove all the marketing info and just leave the notice up. After traffic drops to specific level, add a not on the replacement product page, "If you came here looking for X,---" and add redirect.
Hope that helps