Pain is good for the vast majority. The issue is when things are broken/not normal functioning. So, those are the things that should be addressed rather than using opioid and similar drugs to treat the symptoms of those conditions, IMHO. But there are ways to desensitize, unfortunately, those usually aren't 100% permanent though they do train your brain to be able to withstand it a little better.
Anecdotally, as someone with chronic pain as well as someone who has had to ensure severe pain such as running on progressively severely stress fractures legs, knees, and feet for weeks as well as experiencing migraines that sometimes cluster, issues from nerve damage, etc., while I do have the ability to mask a lot of pain, I actually feel it quite intensely still. But take that with a grain if salt as I am neurodivergent and have a hard time ignoring things or forming habits of any kind based on exposure or repetition like most people. And the damaged nerves that I have may not be able to feel touch or pain very well, but actually acute the pain is often more intense even if chronic pain is numbed.
So it's fairly complex, and, assuming you don't have a medical condition that prevents pain receptors from working properly, the nervous system, including the brain, adapt to ensure that you're able to feel pain when needed to prevent injury. So there's unlikely to ever be a way to "switch on/off" or "dial down" pain that will continue to work long term without your body adapting to it. But damn I wish there were. 🙂
What might be possible in the very far future, outside of drugs that are typically fairly indirect intervention, would be an electronic nervous system interface that could monitor and intercept and adjust signals so that your body doesn't "realize" there's anything "wrong" and doesn't try to adapt or repair it. But that would be pretty complex tech and extremely risky surgery for even cutting edge technology right now.