Wherein means "in which place, situation or thing; in what way." It is a formal word that is almost equivalent to where.
an organization wherein each employee is valued and respected
an organization where each employee is valued and respected
In sentences 1-4 you have integrated relatives (often called "restrictive"), the sort that isn't surrounded by commas. You can tell these are relative clauses because they have gaps—specifically, their subjects are missing.
The gap in each case is left behind by the relative pronoun which. But in your examples, you've replaced these relative pronouns with that. You can undo this change and put which back in its rightful spot, if you like:
1. The darts contained a drug that/which [ ____ put the wolves to sleep ] .
2. Few kids in the survey met the guidelines for physical activity that/which [ ____ raises the heart rate and makes you breathe harder ] .
3. Pi came to an island that/which [ ____ is sweet by day but dangerous by night ] .
4. Other major effects have included programs to destroy rabbit holes or use viruses that/which [ ____ sicken and kill rabbits ] .
If these were supplementary relatives (often called "non-restrictive"), the sort that's usually surrounded by commas, you wouldn't be able to replace which with that; you'd be stuck with which in each case.
In sentence 5 you have something very different! The clause following that is complete and therefore contains no gap. And without a gap, there's no place for a relative pronoun like which. The word that, therefore, cannot be taking the place of which; there's no substitution to undo, because which wasn't there in the first place.
Instead, this particular that is a subordinator, introducing a subordinate finite clause:
5. The answer is probably as simple as the fact that [ people change ] .
Since this isn't a relative clause, the relative pronoun which has no place here. Since which isn't an option, you're stuck with that in this example.
Best Answer
The adverb "when" is used not only to refer to time (at what/which time, at the time that, etc.) but also an occasion or a situation (on which occasion or in which situation).
The same is with the adverb "where" that is used not only to refer to a place but also an occasion or a situation.
So it's in the sense of "occasion or situation", both adverbs are interchangeable. Look up the meaning of situation in Oxford Dictionary for more understanding).