Display discontinued products, without price and sales functions
From a SEO perspective you should not have dead links, so when discontinuing products, it would probably be better to still display them when visiting the product details link directly, but hiding price and sales functions (like add to cart).
Could be solved by simply having a 'Discontinued' status, using a different view/display, who is also making them disappear from categories and modules (only available on direct product details link).
This would also allow you to add related products, product(s) replacing the discontinued one, or similar alternatives - using the existing functionality for this. Which would encourage visitors to buy other products, rather ending up on a dead link.