Well... There are limits! I would guess that somewhere in the 10-20 year old range is where the changeover happens, though of course that will vary wildly depending on how that 10-20 year old plane was maintained.
And if you manage to get a 40 year old plane that was the owner's absolute pride and joy and isn't so old as to be wearing out, it can be cheaper than a 20 year old plane. However, as time goes on they do get more expensive, and of course it's extremely rare to find someone's pride and joy for sale while it's still their pride and joy. As a group, we are not good at knowing when we should be done, and so many planes fly less and less until they're rotting away in a hangar.
I also feel like once a plane hits 8,000 hours or so it's going to cost more. My sample size on that isn't large enough to be significant though.