This seems only partially correct. If by "they" you mean Germans then yes, Heroin was engineered by them, or at least first made commercially available by Bayers. The US government had nothing to do with it. It was marketed as a less addictive alternative to morphine although I highly doubt anyone who made it actually believed it was safer. I have no source for this but I think it is a safe assumption to make.
The temperance movement was mainly related to alcohol. There were groups who wanted abstinence from everything but that was not its primary focus. They may have played a part in said act but I don't know. They were definitely not the driving force behind it though. Racism played a bigger role than the temperance movement. The government was also aware there was a very real problem with drug addiction.