Probably the most important difference is that through is used with an action or process, not with the agent who actually performs the action. (You may, however, effect something through an intermediary). By may be used with both.
The data were collected through a telephone poll of residents.
The data were collected by a telephone poll of residents.
∗The role of Hamlet was performed through Olivier.
The role of Hamlet was performed by Olivier.
By is far more common. As you may see from the Google Ngram below on a handful of random verbs, through appears to be getting more popular, but for most verbs it's used less than 5% as often as by. Note, however, that for a couple of verbs the percentage is significantly higher. These verbs are achieved and accomplished, which are inherently more "processual" than the others.
Most of the time, by is just fine. There is certainly no reason to avoid it; on the contrary, the sort of Elegant Variation you describe is almost universally deprecated. But when you're dealing with processes, it's OK to use "through".