get a refurbished or pre-owned ps3 as those won't break the bank and are becoming more and more available as people begin to sell their consoles to save up money for the "next big thing."
There's no point to get a ps4 unless you have enough games on your mind that you'd like to play and exists on the ps4.
You're right that the PS3 is on its way (if not already) to being discontinued, but that doesn't devalue how much fun you can get out of the console. That being said, if you're someone who really cares about graphics and need the HDR/4k experience, you won't get that on the ps3 (and to be honest not even the ps4 unless you go with the Pro which is unnecessarily expensive)
But really, if you mean good graphics in the context of games that look good, you can get your fair share of them on the ps3. Just be mindful of the age of these games. Don't expect Death Stranding, Cyberpunk 2077, or Ghostwire: Tokyo levels of graphic immersiveness on a console that can barely open the Playstation Store.