I remember reading something about Hinkley's secretary had an affair and justified it by the wording in the temple, so he changed the wording. Is that true?
Nope. It meant as long as tab A was only inserted in slot a or c but not b, you were good to go without having to get a piece of paper giving away half of your stuff.
Yes, the temple wording referred to "sexual intercourse".
I remember the discussion, at Hinckley's time, when the GAs became horrified to learn BYU students were laying naked together and engaging in mutual masturbation or oral sex. Technically that was not considered "sexual intercourse".
After that "sexual activity" replaced "sexual intercourse" in interviews.
The change was made because enterprising people (BYU students) were engaging in everything but sexual intercourse and they justified it because of the specificity of the temple language. BTW people (BYU students) would also go to Las Vegas and get married for the weekend and then get divorced before returning home. That's why the temple recommend question about prior marriages was added.
Did this include the "legally and lawfully wed" bit in the early days of the church? If so, every polygamy-practicing "prophet" was an adulterer and covenant breaker.