Some hospices hasten death with overdoses of pain meds.
The moral principle that has existed for longest time and still works is to give as much pain medication as necessary to relieve suffering even if it secondarily hastens death.
Not morally permissible is giving more medication than necessary and causing death.
You can also blame hospitals for doing that and other things that cause death. The question is whether it is done intentionally or accidentally, w/r/t morality. Iatrogenic death kills a lot of people each year.