As has been noted many times in previous discussion threads, even the worst modern cars are safer and more reliable than cars of a generation and more ago.
Even with my Impala, I could easily have kept it and put additional money into it and had a quite drivable car. I chose not to for two basic reasons.
First was that when I had it thoroughly looked over by both the dealership service department and the independent shop I have mostly used in recent years I got a total consensus that I could keep it going but they were very concerned I would likely end up being stranded.
Secondly, the estimated total cost to keep and maintain the car over the next five years was more than what I would have to pay out for a new car minus sale or trade of the Impala. I added in normal maintenance costs (oil, tires, brakes, etc) insurance and taxes, etc for both keep old versus new in my calculations. I even looked at the five year difference in paying out X amount of big bucks for the new car up front versus what that would cost in lost investment income for doing so. The total money calculations slightly favored keeping the Impala and I almost did.
What tipped my choice toward replacement was personal safety. The independent shop pointed out that several developing problems were with systems already replaced once - intermediate steering shaft, shift interlock, power steering pump and rack - and several electrical / electronic components already replaced as much as three times. Obviously those systems were proving trouble prone and all out of warranty. Add in the transmission problem that I had made worse with a premature shift from reverse to drive without fully stopping the car between as well as a sudden almost overnight change from using no oil to going down one to two quarts every 500 miles with no sign of why and where…add it all up to lost confidence in the car.
The final kicker was twofold. The Chevy service department admitted they were seeing heavy warranty repairs on the new Chevy engines and electronics as well as a mountain of problems on my 2007 model. Add that all the mechanics at the independent said bluntly if, as a woman physically unable to do my own repair work, I were a member of their families they would get me out of that car into something more reliable.
So, I swallowed the financial hit and traded for the Camry.
Would I ever buy another GM car? Yes, if my research made me think it a good bet.
Make the best decision you can based on the information you have at the time, hope to make more good than bad choices, and learn from both good and bad outcomes.