I think
Charmander, the Stray Pokemon was the earliest episode that brought up the possibility of death in plain language.
Other episodes.
The Ghost at Maiden's Peak (she and her lover passed)
The Tower of Terror (Ash was dead for about 30 minutes)
Ninetales' Master in
Just Waiting for a Friend (he and all his servants dead)
The Dragon Holy Land Dragonite's Trainer (Johto) (When Dragonite's backstory was explained)
Celebi and Joy (Ritchie travels back in time to prevent a death)
A Shipful of Shivers (The Ghost Pokemon's Master is dead)
The Origin of Mewtwo (All of the Clones except Mewtwo die)
Pokemon Shipwreck (they hold a funeral service at the beginning of the episode)
There's more but yeah. It's been done in the anime.
Ash is also familiar and acknowledges the possibility of death in
Sparks Fly for Magnemite.
I only saw like 30 mins before getting bored.
... let me show you the door ...
But seriously, that movie is pretty much everything you're looking for in regards to this topic.