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
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.