When I fell into the heroin and suboxone trap this was a major issue for me. However, I was in a controlled environment and given medication to combat this.
Outside of that environment, I had to either just deal with it or obtain drugs illegally (AND I'M CERTAINLY NOT ADVOCATING THAT). I'm very tolerant to sedatives also, so it usually took a benzo. I hear DXM works wonders for opiate withdrawal and its complications. I advise you do some research on it, (AS WELL AS SAFE DOSES AND FORMULATIONS TO USE). It could help.
I would recommend loperamide, but using it to replace opiates is very unsafe practice. People have died from it, I couldn't tell you exactly how as I've never used it personally. I just know that a few people who were well known on BL have lost their lives to it. So don't do that, I only bring it up in case you've heard it before and considered it. IT IS IN NO WAY A SUGGESTION.