By and large, I personally reckon a good rule of thumb is to drive at as low an rpm as your car will comfortably accept without going so slow as to impede other drivers while you’re accelerating.
Now, I know, I know… that sounds really boring and ultra “old fuddy duddyish” and I don’t disagree - but in the context of super duper longevity of your car - certainly, the research shows that the more “softly” you drive it, the more it’ll thank you for it. And this includes braking too - the softer you apply your brakes, the longer your pads and discs will last and basically, all around your car will go through less stress and wear and tear.
But that being said, some vehicles are simply designed to have the living bejesus fanged out of 'em occasionally. I mean, it would be sinful to have a highly strung Lamborghini or Ferrari and to drive it the way I just described. So many of the parts would suffer through “lack of use” if you know what I mean - and more importantly, high performance engines (including high performance motorcycle engines) really do like having the cobwebs blown out of them on occasion. To this end, a good 150 mile fang at high speed once every month or two is just the tonic.
Overall though, in city driving and suburban driving, the softer you drive you car the better it is for prolonging the quality of the car. And you’ll get better fuel consumption too.
In answer to your original question, I would imagine a typical 2.5 litre engine would easily and comfortably handle 4,000 rpm on a regular basis - however I would also contend that it would easily get you around town with a 2,500 rpm crossover point between gears too.
I once used to own a wonderful Alpina E21 BMW 323i with a very highly strung 2.7litre Alpina straight six in it - a real screamer engine in a very, very light small coupe - and it was a car which never once didn’t rev cleanly and smoothly all the way to 6,500 rpm almost every time I drove it - even without changing spark plugs for 2 years at a time.