I would say that if your going for a "Not really the hero of the story" set up, you can only pull it once... maybe twice without repeating yourself (I'll give my example later). Doing it repeatedly, in the same story, will leave a bad taste. One of the points of an ensemble cast is that all characters have a purpose for inclusion and are well developed. When I think of ensembles, I think to most Star Trek or Power Rangers (and Super Sentai by proxy) or most Joss Whedon shows. An individual part of the story may focus on a character even though that might not be the designated "hero" character (An episode of TNG might focus on Data's struggles, even though Picard was the Captain and thus "Hero" of the show. An episode of Power Rangers might focus on a story where the Pink Ranger is the important character, even though both Power Rangers and Super Sentai put the Red Ranger as the hero (traditionally). And despite the show titled "Buffy the Vampire Slayer" one of the best episodes, "The Zeppo" is told from the point of view of Xander, who is having a parallel adventure with Zombie Frat Boys to what is clearly a very big apocalyptic crisis that the rest of the gang are dealing with in the background.).
That said, you can get away with this, by setting up core cast to seem important but only die. Buffy tried this twice, the first time being more a footnote. In televison, it's almost always assumed that characters in the credits will live through most of the season (getting credited in U.S. television generally comes with a contract to do so many episodes per season, typically at least a majority). However, for the two part pilot, Wheadon wanted to include in the credits an actor who was initially set up to be the friend turned foe, by getting turned into a vampire as revealed in the cliffhanger... and then killed off by the end of the plot in ep. 2. This was to highlight the style of the show which was very subversive of dramatic clichés and tropes associated with the teen horror genre. Wheadon was able to pull this off in season 6, when a nearly 3 season recurring actress and fan favorite, Amber Benson, was finally promoted to a title credit appearance... in the same episode that ended with her character's death after which she had left the show. The stunt was done so the surprise ending was masked from viewers and leeks, as her death began a major plotline that would carry the rest of the season and finally steeled that season's villain and plotline to head towards the conclusion.
Its certainly possible to do this... but don't do it three times... an ensemble works when the majority of the team win, not just the hero.