You only need the last variant, the first is just to show the result of the link composition.
A caveat with this approach is related to what happens if you change the class name or subject name. Either you’ll need to remember to update all the Klasse fields and/or Fach fields, or you’ll need to remember to change the corresponding notes, i.e. HH23A IW, at the same times. Without fully knowing your context, you might be better of defining the class link completely like in:
KlasseLink: "[[HH23A IW]]"
If you now rename the note the links will be updated, and you can still don’t have any redudancy but you do need to split the link into Klasse and Fach if you need those bits. This will also make getting the teacher slightly easier, as you now could do: this.KlasseLink.KlassenLehrer.