That 2017 200 will likely be worth more than a 2024 250 in 5 years. That "Lifetime" warranty is not a Toyota warranty and is not worth much. Post up the fine print! Look at the depreciation curve on a 2017. When does this ever happen in the first 10 years. Except for Covid, almost never.
The "lifetime" powertrain warranty is offered by the selling dealer and it's completely free.
It's of course worthless on the used market because it's non transferable, but to the original owner buying the vehicle new who is going to keep the vehicle long term, maintain it by the book, and use a shop to do so, it definitely has value.