It seems like people had symptoms that were mistaken for stomach ulcers in the popular knowledge of the time. The incidence rate going down for stomach ulcers after learning more about stomach ulcers tells us nothing about what happened to those people. We don't know what they were really suffering from, what they might now-a-days be diagnosed with, etc. And we aren't told anything here about what other environmental factors may have led to a decline.
the question is one about etiology. the history suggests that the popular etiology (bacteria and probably also NSAIDs linearly cause stomach ulcers) is entirely insufficient. the questions you're asking ("we don't know what they were really suffering from") are important, but to most people these questions don't matter anymore. there is practically no medical research being done on these questions today. why bother? the "psychosomatic school" is the only school who takes the issue seriously anymore. their work is worth considering, that's my point.
The possibility that there's at least a component of the illnesses that aren't psychosomatic is worth considering, but such a school of thought has always been on the fringes, and serious funding to examine actual causation has always been a challenge for illness communities that have offhandedly been thrown straight into the looney bin.
for what it's worth the "psychosomatic school" i'm most familiar with criticizes harshly the "psychosomatic school" that i believe you're familiar with. indeed there are many ineffective and harmful centers for the treatment of "chronic illnesses." it's really shameful
A more complete telling of the story may be that researchers ingested a volume of the bacteria that was more than their immune system could easily contain, and got ulcers.
Given that stress is well known to be a cause of immune system impairment, this could still be an upstream cause of the bacterial outbreak that then leads to ulcer formation.
In ordinary conditions (i.e., not drinking a vial of bacteria), immune impairment is a necessary condition (or cause) of the H. pylori outbreak.
And stress is one possible upstream cause of that.
But that aside, the virulence of an infection will always be greater against those who have weaker immune systems. This is why we always see the elderly and those with pre-existing serious illnesses more likely to be struck down or killed by infections.
Stress is just another factor that can lead to impaired immunity and result in an infection becoming virulent.
it's an important point to make, that clearly there is an "organic" component and a "psychic" component to every ailment (or human experience for that matter). as anyone who has recovered from a primarily psychosomatic chronic illness can attest, you're eventually faced again with the contradiction between organic and psychic when you get your first head cold or whatever. this is a question of internal vs. external, dialectical vs. mechanical.
if someone murders me, we could assume this is a mechanical act. the immediate death obviously wasn't some sort of psychosomatic construction. no matter how mentally prepared i was for the moment the bullet pierced my forehead, a fundamental biological law asserted itself and there was nothing i could do about it.
but here we have no problem jumping straight to asking the question "what was the murderer's motive?" perhaps i was in the middle of robbing a bank. why was i robbing the bank? naturally these answers help construct the etiology of the death (and extend into other etiologies!). the question is: where do we draw the lines between moments? the radical answer is that we shouldn't. we should be willing at any moment to consider the many possible ways in which the various forces interact. bring the mechanical into the dialectic, so to speak.
in this light, is "stress" a useful etiological category? i don't think so, or at least i think its utility is much weaker than the pharmaceutical industry would hope.
freud had a client named elizabeth von r whose leg pain of two years was suddenly cured after working through its origin: her father, on his death bed, would rest his head on her legs as von r cared for him. was von r's leg pain caused by "stress?" hardly more than it was caused by "living." both of these proposed causes are obviously cop-outs.
edit: the point then is not to find the singular cause or plural causes. the point is to abstract the forces to analyze their underlying laws of motion and then to creatively synthesize them to predict and change the future. that's what science is. this is not the level of operation of our medical or psychiatric industries or their researchers.