It is not possible to tell what actions led to the thigh infection, because there are multiple possible actions that could.
Explanation: Close bodily contact of any kind can transmit herpes. That is, the virus jumps from an infected person to another person by close bodily contact (i.e. rubbing of some type).
If someone was engaged in a sexual act with you and rubbed an infected part of their skin on your thigh, then, yes, your infection would be considered a sexually transmitted infection.
If your lesion is reasonably far from the genital area, however, it's more likely to be an instance of herpes gladiotorum, which is a sports disease, not a sexual disease. Wrestlers, rugby players (in a scrum), and so on, engage in very close physical contact, and this can lead to spread of herpes from one person to another through a non-sexual route.
As a child, you may not have been playing rugby, but you might have been wrestling with an infected friend, or the friend may have bit you on the thigh, or who knows what. Where your friend got infected, or how, is of lesser importance.
If it has not come back since the original appearance, I would not worry about it. Could you as a child really tell a herpes vesicle from a bug bite? Could you as an adult?