This is a good post, I whole-heartedly agree. As someone who has used opioids for extensive periods of time, I can tell you without a doubt that it will affect your natural testosterone production (and many other components of the endocrine system). It seems like in just the last 10 years or so there have been more studies conducted and published with this issue in mind. I would guess that is due to the prevalent nature of people on long-term opioid regimens for pain control. You are talking about a lot of people nowadays who are regularly taking opiate/opioids to treat chronic pain, and they have side effects and complaints. Studies have shown for adults taking opioids regularly, something like 75% of them suffer from the effects of low T. It has been demonstrated that exogenous opiates will flat-out decrease the creation/secretion of testosterone in the testes, as well as to affect other hormones (such as decreases in LH) that can contribute to a sort of feedback-loop causing testosterone levels to plunge.
The side effects of the low T come in all shapes and sizes, but for example, one study of chronic pain patients taking opioids for months had a significant rise in the number of prescriptions written for ED drugs for people taking opioids as compared to those who weren't. Certainly libido can be affected, erectile dysfunction can occur, fatigue, even depression, when serum levels of testosterone get very low in men. And your hard work pumping iron won't do shit for you, either, it's depressing to literally be incapable of gaining strength and muscle mass even when working hard.
I have noticed that people are becoming more aware of this, or I should say that the medical community (who used to pretty much IGNORE this) is now paying much more attention. When I was on opioids for long periods of time, I eventually came to self-administer testosterone injections. If I didn't, I had tremendous side effects (especially the loss of libido and sexual dysfunction). By regulating my testosterone I could continue taking painkillers and otherwise be pretty normal in the ways you would expect a relatively young man to be. The doctors were often unresponsive to the issue, or claimed that there was too much medical downside to supplementing testosterone while on long-term opioid regimens. That was years ago, perhaps things have changed now.
I would like to note that all of the studies I've read show that people taking opioids for the short-term pretty much always reverted back to normal testosterone production within a reasonably short period of time after the intake of opioids ceased. Even in long-term users (months to years), the same thing occurs. It does not appear to do any permanent damage, at least not to the hypothalamic/pituitary/gonadal axis. And that was my experience as well. Ceasing opioids made me feel SO different. The first time I had to come off painkillers, I was not managing my testosterone at all (my doctor never mentioned it), and I have to say that once I got past being consumed by how shitty I felt while in withdrawal, I noticed a massive increase in libido. Just a huge, huge difference - almost like a part of me was missing for a year and suddenly just returned. Huge increase in energy as well; I didn't realize until I got off the painkillers just how badly they sapped my energy.
That said, I don't know if there is any literature on permanent damage caused by VERY long-term opiate use or particularly abuse where doses might be incredibly high and the drugs used might be incredibly powerful. So I have no knowledge of what, say, a 15-year heroin habit of >3g per day might do to your body. I would guess it is at least possible to have lasting side effects from such a habit, but everything I have read has simply suggested that the heavier the habit, the longer it took for natural testosterone production to get back to normal upon cessation of drug usage. So maybe for some people they may feel back to "normal" in 3-4 weeks, others it might take 3-4 months.
Before I discovered what painkillers were doing to my testosterone levels, I suffered through a lot of fatigue, depression, and almost despair because even when I would force myself to go workout or lift, I never looked any better, and didn't really feel any better either. I figured I just had to deal with a lower quality of life in order to control the pain. When I found out how low my testosterone levels were, and when I found out how much better I felt when I raised them back up into the normal range for my age, it was literally like I found the holy grail. Can't tell you how happy I was to find out I could still have energy, I could actually have sex again, and I could build muscle and strength when I worked out. So frustrated that my doctor(s) never said a damn thing about it. For a man to go a couple of years with really low T, life can be pretty abysmally depressing.