I probably didn’t do it quite the way you prescribe, but I bought a new Toyota Matrix in 2006 and drove it for almost 17 years. I loved that car! It recently required several repairs adding up to well over its worth, so I bought a new 2022 Toyota Corolla Hatchback, almost the same vehicle. Yes, it’s gas, but I don’t drive much. Work is from home and/or a couple of miles. Living in the city doesn’t require 20 mile round trips.
I had been making $400/month car payment into a savings account for several years allowing me to put down well over half the total amount, including all the ridiculous added fees. This kept my car payment at $400/month for four years. The nice thing is that I know I can comfortably make that payment.
This might be my last car since I’m 73, and she’s a sporty bugger!