Drive Porsche without loss of value?

Hello together, I’m thinking about whether there is an older model of a Porsche that you could buy cheaply, drive 2-3 years and then sell almost for the same price (+/- 5k). Do you think that works with a Panamera or an older 911? Do you have tips or ideas? My budget would be about 30-40k. Greetings and thanks for your opinions!