>I do wonder though how did people deal with these problems in the past when neither ADHD or these drugs were recognized and available.
I was diagnosed with ADHD as a child and again as an adult. I was medicated as a child and for part of my undergrad but intentionally haven't been medicated for more than fifteen years. I can give you my own personal picture of this situation.
My understanding of my own now-sober psychology is that I will avoid anything that I don't have to do or don't actually care about (where these are contextually defined). While unmedicated, I focus on the things that I actually want to focus on, but the extent to which I can consciously control what those things are is largely out of my control. In this state, my conscious mind plays the LLM to what my body and unconscious mind are doing, namely my mental narrative is simply justifying and predicting what the next actions will be rather than determining what those actions actually are.
When I was medicated, it was the exact opposite. My conscious mind was seemingly in control. Other inhibitory parts of my brain were turned off and I was able to consciously decide to do something, and then simply do it. In my personal experience though, the results of having "properly" functioning executive action were decidedly negative.
The sober me that is in my body and doesn't require self-talk to actively maintain is content to be an economically unproductive, no-status nobody, merely exploring the world and taking care of my needs and those of my loved ones. The medicated "me" was nothing but conscious ambition, made poor long-term decisions, and created novel stressors with high cognitive loads that required constant medication and self-talk to maintain.
I realized that I identified more with the sober me than the medicated me and accordingly stopped taking stimulants.
To draw on all this to answer your question, I think that in the absence of habitual stimulant use and being surrounded by the "achievements" of those that are habitual stimulant users, the majority of people wouldn't know of or have "these problems" but simply lead uneventful, low stress lives, following their very bodily-determined whims and fancies.
Sure, there'd be fewer Paul Erdőses ("You've showed me I'm not an addict. But I didn't get any work done. I'd get up in the morning and stare at a blank piece of paper. I'd have no ideas, just like an ordinary person. You've set mathematics back a month.") churning out theorems, but equally, there'd be fewer Hitlers (See: Blitzed: Drugs in Nazi Germany), SBFs ("I think they are things that, on the margins, helped me focus a little bit. I wish I had been a lot more focused over the last year."), or Caroline Ellisons ("[N]othing like regular amphetamine use to make you appreciate how dumb a lot of normal, non-medicated human experience is").