Let's analyze each part of it
The foreshadowing:
DBZ: Since beginning Sayans have transformation being the first one Ozaru itself. The battle with Nappa and Vegeta Goku showed to have a technique(which fits perfectly as transformation) that boosts his power level(more speed, power, durability, endurance etc). In the Freeza Saga specifically big part of the story is around the Super Sayan legend that Freeza is terrified about it. So I would so it isn't the best of foreshadow but it is a good one, pretty consistent.
Naruto: Already hinted about Sage Mode at least with Jiraya using it against Pain. It showed how Naruto trained to obtain it before he finally uses it. I would say a bit better foreshadowing than Super Sayan.
One Piece: The first hint was Kaido saying that Luffy's G4 is not how rubber is suppose to act. Which sucks, since when Kaido is a master of rubber? Does he have rubber PhD? Doflamingo, Katakuri, Big Mom, Cracker... No one said a shit about his G4 and how rubber was acting. We had Who's Who talking about Nika but no connection at all to Luffy. So no there was no foreshadow for G5 it came from nowhere and there is no explanation for it.
The purpose:
DBZ: Super Sayan purpose was not to match Goku's power with Freeza but to overcome him. And so he did. Super Sayan Goku was so much stronger than Freeza that he even humiliated him at the end of the battle not giving him a proper death. Purpose well executed.
Naruto: Sage Mode purpose was not necessarily to have Naruto matching Pain's power or even less surpassing him. It was just a power up, one step ahead on his Ninja path to become Hokage. Also he relied as usual to Kyuubi in order to beat Pain. The purpose was OK but not as good as DBZ.
One Piece: G5 purpose was to beat Kaido. And so he did. But! How he did was very ridiculous. Even after G5, besides the beginning of the fight where it was all hype the new transformation and Kaido acting like a dumb towards it after that Kaido still showed how he was superior than G5 because of his haki being greater and without any explanation Luffy managed to overcome him. So the purpose was fullfilled but in a very bad way.
The power:
DBZ: Super Sayan has nothing unusual to DBZ. It just makes the character stronger. No special techniquer comes from it. It fits perfectly the lore of the manga since it is all about getting stronger and not necessarily learning new techniques. Great Power.
Naruto: I may be wrong but I guess it was something new for the manga. Don't recall anything like that before the close we could get were Orochimaru's curse transformations, Tailed Beasts users transformations or Rock Lee/Mighty Guy opening the gates. I would say it fits the manga lore pretty well, it gives a boost of power to the user but also allows him to feel other people chackra. Great Power a bit better than Super Sayan.
One Piece: So the power is ridiculous as it says in the own manga. It destroys every battle Luffy had before. Make us question if he ever died before he would just ressurect like he did with this transformation(which he says it is his peak) and then win the battle. The power takes away any tension of the battle which One Piece Fans clearly loves it giving how much tension the best fights had and how Oda was desperately trying to put tension on Luffy vs Kaido but miserably failling. No the power it is very bad.
I would say that Sage Mode is slighty a better power up than Super Sayan but both are very superior to G5.
We could have talked about Bankai or Hollow Ichigo too. Gon's human form etc. I can't think in a power up as bad as G5.
[automerge]1683047685[/automerge]
Agreed. He took the best power ups from both manga to compare with the worst from One Piece.
Actually I would say that Super Sayan God, Super Sayan God Blue, Ultra Instinct are better choices to compare G5.