To eliminate the problem of end of life heroics would it be possible to add something to Medicare like you get x dollars you can leave to your family if you forgo the heroics. Where x is day 10% of the cost of the heroics?
Then people have an incentive to save money but death panels aren't needed.
Of course this is assuming the heroics rarely work.