That's right.
It's likely that both of them won't be existing anymore by 10 year but it shall be Shiba Inu that shall be gone first. But for Dogecoin, there might still be a community that will have it alive.
To have these coins as part of your portfolio, it should be the amount that you can afford to lose.
Dogecoin was launched around December 2013, So it's almost 8 years old