Provide a discontinued checkbox on the product page that will disable the buy button and include a discontinued message to the customer at the top of the product description.
Example of system Product Discontinued string value: We're sorry but the {0:ProductName} has been discontinued. Please check the {1:related products} for suggestions.
I also wanted to add that Discontinued products by default should not show up in the store's product search results, but it should still be published and show in Search Engine (e.g. Google and Bing) results for SEO and to increase store traffic (from customers that are searching on old products that they are unaware have been discontinued). Perhaps, the user could choose to include discontinued products as a search filter option.
This is a great feature request and should also provide a field to redirect customer to the replacement product.
When product BP40 is changed to BP41, the BP40 page will show that the BP40 is now discontinued but it's replacment product is now BP41.
You must keep both products in the database as the customer who has the old BP40 part ID, will search for that not knowing BP41 is the new part needed.
You can use the following workaround in the latest version. Unpublish a product. Set "catalogSettings.AllowViewUnpublishedProductPage" setting to "true". And then rename "ShoppingCart.ProductUnpublished" locales "Product is discontinued". You won't see this message right on the product details page, but it'll be visible when a customers tried to add a product the cart.