This is a good question that always sparks good conversation. I feel leglocks are great to teach early on. As the fighter progresses, s/he will gravitate to what interests them the most and they'll create a game around this. It could be leglocks, RG, passing, etc. The fact they were exposed early on will allow them to make this choice.
Then it comes down to the student. Are they aware enough to know they should tap? Is the student putting on the sub aware enough to let go and keep going? This awareness comes with reps and drilling. It's a costly mistake if there are two unaware grapplers that are both going for legs. It's perfectly okay to tell your training partner, "no heel hooks" or "no toe holds", and incrementally add what you're willing to defend.
Then it comes down to the student. Are they aware enough to know they should tap? Is the student putting on the sub aware enough to let go and keep going? This awareness comes with reps and drilling. It's a costly mistake if there are two unaware grapplers that are both going for legs. It's perfectly okay to tell your training partner, "no heel hooks" or "no toe holds", and incrementally add what you're willing to defend.