The following contains spoilers for the One Piece manga by Eiichiro Oda, available in English from Viz Media.
One Piece is a larger-than-life adventure featuring larger-than-life characters with fantastical powers. It should come as no surprise that creator Eiichiro Oda loves to draw inspiration from real-world mythologies, which are some of the most grandiose stories around.
Whether it's Elbaf, a nation of giants that is a direct reference to Nordic mythology, Sengoku's Buddha devil fruit or Momonosuke's relation to the Japanese tale of Momotaro, One Piece is rife with mythological references from all over the world. Blackbeard and Luffy's relationship could also be a reference to a mythological tale from one of the oldest civilizations on Earth: Egypt.
One Piece's Blackbeard and the Egyptian Mythological God, Apophis
In the Egyptian mythos, the god of darkness and chaos, Apophis, is the sworn enemy of the sun god, Ra. Every day Ra used the sun as his divine barge, sailing through the sky and bringing light to all the land before settling in the underworld for the night. Apophis sought to kill Ra whenever he sailed into darkness, but was unsuccessful each time.
Apophis is the god of darkness but also possesses the ability to create earthquakes -- very similar to Blackbeard in One Piece, who possesses both the Yami-Yami no Mi and the Gura-Gura no Mi. Apophis is also depicted as a snake, a creature said to share the same characteristics as Blackbeard. In mythology, snakes are creatures of deception and cunning, two traits that describe Blackbeard perfectly. He waited for decades to find the Yami-Yami no Mi, infiltrating the Whitebeard Pirates for the opportunity to obtain it. Blackbeard led his crew mates to believe he was part of them, only to betray their trust the moment they found the devil fruit he sought.
One other factor that pairs Blackbeard with Apophis is the overall symbolism of the snake. Snakes in Egyptian mythology are depicted differently than in other cultures, often shown to be creatures of royalty and protection, except for one: Apophis. Just as Apophis is the snake that breaks the mold, Blackbeard breaks another one in One Piece. The D Clan -- which Blackbeard is supposedly part of -- are shown to be fearless in the face of death, often dying with a smile on their face. However, whenever Blackbeard has been close to dying, he begs for mercy or tries to weasel his way out somehow.
Luffy, Nika and the Egyptian Sun God Ra
As for Luffy, the connection to Ra is more readily apparent. In the battle against Kaido during the raid on Onigashima, Luffy was severely damaged to the point that even fans thought he had died. However, his devil fruit suddenly awakened its true abilities, revealing it was not the Gomu-Gomu no Mi, but the Hito-Hito no Mi, Model: Nika.
In One Piece's mythology, Nika is the god of the sun said to spread joy wherever he goes, and seeks to bring smiles to the faces of the oppressed. Such benevolence is closely related to Ra, said to be the father of all creation who arrived in the universe to banish the existing darkness.
The true name of Luffy's devil fruit brought with it another connection between the captain of the Straw Hats and the real-life sun god. The ship the Straw Hats sail on is the Thousand Sunny, the figurehead of which is the head of a lion -- but it also distinctly looks like a sun.
Sun god Luffy sailing across the One Piece world, liberating oppressed people and spreading joy while sailing on a sun is a quite literal interpretation of the myth, but all the signs point to this being the case. Many characters in the story have said that Luffy will bring the "dawn of the world", a still-unexplained concept within the narrative. A face value interpretation would give the assumption that Luffy will change the world for the better in some way, but for now it stays as just another connection to Ra, who brings the dawn each day.
Blackbeard is thought by fans to be Luffy's final opponent in One Piece. While this has yet to be confirmed, the god of darkness facing the god of light in a final showdown would certainly be a fitting ending for these two characters.