How to handle discontinued product pages in online stores? Via +John Mueller​​​ from Google (but text bottom is my solution)!

My solution for product pages for ecommerce sites is "always online and always in stock". When I will stop to sale some product (forever), I change stock to zero and stop sales, but product stay online on the same (ranked in Google) URL (you know, ranking is based on urls). After this, when I need to insert new product in my online store, I just rename discontinued product with title of the new product, change description and picture(s). Ready. Always on positions.

I forgot: URL of product pages are changed automatically based on product title, but old URL redirect automatically to the new product URL.

P. S. This works automatically in all of developed by us online stores over php, not over manual htaccess rules. Tested for over 8 years, in over 550 developed by my company online stores.