I was told that heirloom varieties will start to 'weaken' after 3 or 4 seasons. I interpreted this as the plants will be weaker and produce less fruit season after season. What can be done to prevent such weakening? How do we have healthy generations older than 3-4 seasons? Is the answer simply to have a large number of the plants and allow natural mutation and pollination to occur?
You need genetic diversity, and you need to be careful to rogue out plants that are either weak or aren't true to type.
Some varieties may not necessarily "weaken", but some will revert to more wild types. I've heard this of lettuce: it will tend to get bitter after a few generations of seed saving from inadequate populations.
The size of the population depends on whether the plants are inbreeding or outbreeding. I don't know of a good reference for this information except for "Seed to Seed" by Suzanne Ashworth. I don't have it handy at the moment, but I know that population sizes are bigger than is convenient for most home gardeners. For example, I think you'd have to save seed from something like 50 squash plants to have sufficient diversity; a population this size would require a lot of space and produce far more food than most people can handle processing.
For some plants it's easy to maintain a large population -- peas or beans for example.
I'm not certain if you can fix this by swapping some of your seeds with friends (assuming you and your friends have enough plants to constitute a "sufficient population"). You may actually need all those plants growing in the same place so they can trade pollen?