I personally would sell it at anytime especially if am planning to buy a better one. However, I wouldn't consider selling it when it's not working. As long as it's in good condition, you can sell it at anytime.
I guess when you are about to get only below half the price when you purchased it then I guess it would be best to just keep it.
I think these days even the facebook groups do have option to sell old stuff. so that one you can think of for selling.
Now that new edition of the playstation 5 is coming. It can be pretty interesting to try it out for the gaming. I'd be definitely considering selling the old consoles.
PS 5 definitely would make many people put their consoles on the sale. And who knows what may happen to their consoles in near future.
Once stadia becomes popular, you can then keep the console. And after some years, you can sell the console. it won't be much of use in future.