Edit: do note this applies to older cars, it's a bit slower than EVs but 10year old cars will not have the same mileage and power as a new one even with the same specifications.
This is not true, especially the part about "significantly".
The only real mechanism for a loss of performance over time would be if the engine's compression starts to drop as the rings get worn, but this isn't an issue on any modern engine.
Take a car with 10k miles and run it on a dyno. Dyno the same car again at 150k miles and it will probably be within 5%. In fact, performance may even go up as the motor "loosens" up.
This has been my experience.
The amount of dirt a car is exposed to varies by 2-3 orders of magnitude between a farm truck compared to a sports car.
Rarely will you see an old sports car lose more than 20% power. Farm trucks lose 50%+, and the farmers keep running them until they just don't move at all.
*Side note, dirt does sometimes help. As a teen, I had an old ford festiva I shared with my brother. One day we washed the filthy engine bay and after that the thing would not idle. Turns out the dirty grease was plugging a vacuum leak around the pivot on the throttle valve.