Wikipedia gives the overdose level at 75-600mg[2], and Erowid reports the recreational dose at 5mg[3] (both for "opiate-naive" individuals, i.e. no tolerance). >10x is a high safety margin; alcohol is of the order of 10x for reference.
The piece you're missing here is that the primary risk of accidental overdose is greatly increased with illicit heroin where the purity is unknown, and can fluctuate wildly as it always cut to some extent, but seldom predictably so.
In the case of heroin, most of the harm from usage is directly caused by prohibition.
[1]: https://www.ncbi.nlm.nih.gov/pubmed/11705488 [2]: https://en.wikipedia.org/wiki/Heroin#Overdose [3]: https://www.erowid.org/chemicals/heroin/heroin_dose1.shtml