I disagree. Peter worked in that movie precisely because he *wasn't* important to the plot. The stakes weren't tied up in him in particular. He was just there as a fun addition, so if anything didn't work: no harm, no foul. Hell, they could have straight up deleted all of his footage and the movie would still work.
With Riri, yes she was important to the plot but only in a purely contrived way. They didn't really need her to be the Macguffin specifically, it could have been anything. Hell, there didn't even have to be a Macguffin at all. By making that creative choice though, suddenly she's tied up in a plot that doesn't really have anything to do with her as a character. It's a movie about grief, family trauma, and cultural heritage, and Riri just felt out of place. Mostly hanging around with nothing to do, while as a result we as an audience struggle to even get a handle on who she is as a person beyond the surface level.
With Peter; including the post credits, he got exactly three scenes! He was in, he was out. They didn't try and squeeze him into the Zemo plot, or the Cap & Bucky of it all. He was just there to add some colour to what would be an otherwise very grim action sequence. They didn't need to address anything about his character because
he's Spider-Man. Everyone already has at least a passing knowledge of what he's all about. Riri is at a distinct disadvantage in that regard. And yet they still managed to give Peter's story some resonance with Stark's character arc with just one line (the
"avoid using the words 'great power' at all costs line".) Which again, they can get away with that kind of brevity because: Spider-Man.
To take another example of a character introduction in Civil War that worked: Black Panther! Why did it work? Because his story was thematically tied to Zemo's; a man seeking vengeance. Also helps that he was quasi-antagonistic for the most part, had his own agency, and he had a distinct character arc.