In his autobiography he always claimed that he knew the limit of what to take and that’s why he never OD’d, but AFAIK he hasn’t touched heroin since the 70s.
I’m pretty sure he did an interview fairly recently discussing it. I can’t remember where I had read about it unfortunately. It was around the time of the Pirates movie IIRC.