Morphine is preferred for the treatment of COPD because a doctor can better control its effect on breathing, however, both morphine
and methadone work in similar ways -- it is just that
methadone suppresses the breathing longer. At end of life, it doesn't matter much which medication you use.
If your husband had an allergy to morphine, then methadone is definitely the proper medication to give.
Death is not often a pleasant experience, especially death from lung cancer.