The problem with Bucky Barnes’ transition to The Winter Soldier. The continuity was reframed in a way that wasn’t so convoluted as to alienate readers and gave the often blandly written Captain America a chance to stretch and grow. Unfortunately, most deaths are just stunts and usually hurt comic titles more than they help.
Recently, Marvel has found some pretty satisfying ways of working immortality - to varying degrees - into their main storylines. The X-Men have both found a way to tell stories with virtually immortal characters that are still compelling.
It started with Ewing and Bennett’s Immortal Hulk series making such reach his ultimate form.
With the advent of Krakoa, the living island nation of Mutantdom came the introduction of the X-Men’s resurrection protocols. The process is complex and involves laying eggs, reality manipulation, time manipulation, biokinesis, and a strong telepath to coordinate all these disparate elements. Essentially, a psychic backup is kept for every mutant. When that mutant is confirmed dead, a new body is grown and the mind restored from the backup. X of Swords fall a little flat.
Readers for decades have been operating under the assumption that these with a few exceptions, of course. These characters are constantly evolving and changing to better fit with the times, and to reach a new readership. The Immortal Hulk and the recent X-Men continuity should be celebrated as examples of how mainstream superhero books can finally put to rest the mercurial nature of death in comics.