As someone who has seen countless people die of old age and any number of diseases that kill the elderly (dementia, Parkinson's, CHF, etc...) I would say it should be allowed for the elderly and terminally ill under the condition that it's written out prior in very clear directions as to when it is appropriate to euthanize them. No one should have to make the decision about whether or not they're loved one should be euthanized no matter how horrible of a state that person is in. There needs to be written directions from said patient(like a DNR even if it is just a standard document), and approval by physicians, thing is I'm not sure physicians would ok euthanize at all. In my experience physicians do not treat dying patients, these patients are switched over to hospice care because physicians are not comfortable with even easing a patients inevitable death. This might be different elsewhere but my local hospitals won't even allow patients to be admitted to hospice before leaving , they're in the practice of healing people not "giving up on patients".
I understand where physician's come from on this point though, a commitment to life/health and preserving it is fundamental to proper practice of medicine. Allowing yourself to accept defeat even on the most hopeless of cases might slip into you accepting defeat on cases with reasonable but still unlikely odds. Once you cross that line where do you stop? This in many ways is similar to the abortion debate where lines are seemingly drawn arbitrarily, and questions of morality are determined by "science". The fundamental difference between this question and the question of abortion is that the life being terminated is one of a human being who at one point most likely had a semblance of consciousness that could express itself and be recognized by other consciousnesses. That's why I think if this was ever to be instituted it would be key that the individual express in very clearly written form when it is appropriate for their life to be ended, especially before they're in the full grips of whatever afflicts them.
Discussions on euthanasia continue and will continue for a very, very long time. The issue is really ambiguous and acute for modern society. On the website
https://studydriver.com/euthanasia/ I read some non-standard opinions from forensic experts about euthanasia.