Data was originally going to die in Star Trek: Insurrection...at the hand of his captain
Lt. Commander Data (Brent Spiner) perished the first time in Star Trek: Nemesis; however, he would have died much earlier in Star Trek: Insurrection had the original script by Michael Piller been utilized. It was bad enough that Data died in Nemesis. No fan has quite gotten over that, especially as he's been brought back so, much like Spock's death, we wonder what the point of his dying was.
To make things worse, according to The Fifty-Year Mission: The Next 25 Years [via Fandomwire], Data was going to die at Captain Jean-Luc Picard's hand. We don't know much about how, but the pair were to be involved in a fight to the death, and Data would have been killed. Fortunately, Patrick Stewart spoke up and managed to help nix the entire idea. So the movie became the fountain of youth story that it was.
"It was Patrick [Stewart], frankly, who said, ‘This is dark and dreary and it’s not fun,’ and he was the one who put us back on the fountain of youth course that ultimately really leads the story to its current state."
- Michael Piller
In thinking about it, in a battle between Captain Picard and Lt. Cmdr. Data, would Picard really have stood a chance of winning? Data had more strength, more speed, and could outthink and outsmart everyone on the Enterprise. So how was Picard supposed to kill him? I guess it's possible that Picard could have shortcircuited him in some way, but my question would be: why? Why was the idea of a Picard/Data death match even scripted?
We'll never know what Piller was thinking (as the writer died in 2005 at the young age of 57), but we are glad that Stewart and other executives behind the movie decided not to go with this darker version of Insurrection. Data would go on to die in Nemesis and again in season one of Star Trek: Picard before being resurrected in season three of Star Trek: Picard.