Not sure, but you might be confusing memory with storage?
Pretty sure memory stays as speedy and keeps its capacity over time. Though the software we run on the devices seems to constantly grow, which gives an impression of devices being more sluggish. But in reality, it is the software that is less efficient.