Yep, holding a spring compressed does not affect its power over time. At least not to any readily measurable degree. It's the flexing of the spring that causes metal fatigue over time and will eventually compromise the spring. But in most modern springs, we're talking about many thousands of cycles. All depends on the quality of the spring.
There is one exception to this. Every spring has an elastic limit. This is how far the spring can be flexed before it actually bends rather than flexing. This will permanently weaken a spring. Some people have a habit of loading high capacity magazines short by a round or two. This isn't to increase the life of the spring, it's to reduce the likelihood of pushing the spring past its elastic limit and damaging it.