The word 刺激 (shigeki) in Japanese indeed primarily means "stimulation" or "stimulus." However, like many words in any language, its meaning can extend beyond the direct translation depending on the context in which it is used.
Inspiration or Influence: In the first example you provided, 「彼から刺激を受けた部分が大きい」, 刺激 is used in the sense of "inspiration" or "influence." This usage is common when talking about the impact or influence that one person has on another. In this context, it's about being mentally or emotionally stimulated by someone's ideas, behavior, or achievements.
Triggering or Provoking: In the second example, 「失った記憶を刺激すれば、精神にきわめて危険な影響を及ぼしかねない」, 刺激 takes on a meaning closer to "triggering" or "provoking." It's about stimulating in the sense of trying to activate or recall something, particularly when talking about memories or responses. Here, it implies that attempting to bring back lost memories might provoke or trigger a dangerous psychological response.
In general, 刺激 can be used in various contexts where there is some form of physical, mental, or emotional activation or provocation. It can be positive, like in gaining inspiration, or negative, like in triggering a harmful response. Understanding its use often depends on the context and the nature of the stimulation being referred to.