We had a big controversy in the United States when there was a limited number of dialysis machines. In Seattle, they appointed what they called a 'God committee' to choose who should get it, and that committee was eventually abandoned. Society ended up paying the whole bill for dialysis instead of having people make those decisions.
Reasoning based on cost has been strenuously resisted; it violated the Hippocratic Oath, was associated with rationing, and derided as putting a price on life... Indeed, many physicians were willing to lie to get patients what they needed from insurance companies that were trying to hold down costs.
By establishing a social policy that keeps physician-assisted suicide and euthanasia illegal but recognizes exceptions, we would adopt the correct moral view: the onus of proving that everything had been tried and that the motivation and rationale were convincing would rest on those who wanted to end a life.