Not only is wherein a more archaic term, but it actually has a different meaning than where. It means "in which", and is primarily used as a flowery term evoking legal language, or a fancy or pretentious-sounding table of contents in a book. (e.g. "Chapter 2: Wherein Christopher Robin Meets a Heffalump and Pooh Does Not")
The grammatically correct substitution for wherein is "in which". Replacing wherein with where is one of those cases that is probably incorrect in a technical sense, but it's used enough that people will understand you and it won't sound unnatural.
I am not 100% sure of the etymology, but there is some similarity between some of the archaic English terms like wherein and wherefore, and German terms like worin and wofür. The wo- terms blindly translate as "where" + a preposition, but the actual correct translation for the wo-prefix is that preposition + "which". I suspect that the blind translation of the German wo- prefix into the English where- prefix is how we got these terms. See this English.SE question on whereof/wherein/wherefrom/whereupon/wherewith/wherefore.