Why is Jack down on his luck at the beginning of the film? Simple, it's because Angelica is using the Voodoo doll on him to get her revenge on him for marooning her and killing her father.
Furthermore, the witch that Barbossa visits in the film mentions "cursing his enemies." Jack may have more than one reason for his luck to have shifted so negatively.
It's somewhat poetic how Barbossa is giving Jack a taste of the same medicine he had in the first movie: according to one of his crew members in that movie, all his plans brought them from bad to worse.
In On Stranger Tides, Barbossa collected poisonous toads on his way to the Fountain. While he was also planning to use their poison to kill Blackbeard in that film, it was implied that he was just being "an older man with a hobby", suggesting that he showed interest in the biology of amphibious life. With that in mind, it makes perfect sense that his daughter would also be fond of scientific work.
Plus, Barbossa does have a mentality where it seems he's the only smart pirate around - although, to be fair, there have been signs since his original appearance that he's more intelligent than you would expect of a pirate, and he certainly seems to be more educated. note "I am disinclined to acquiesce to your request." Keep in mind that he wasn't just saying this with full knowledge of what it meant, he was also mocking Elizabeth's stilted attempts at parley. Barbossa is very sharp. So it's fitting when Carina interacts with the other pirates, she comes off as the most educated character.
How did the witch Barbossa hired get her hands on the compass? Think back to the last time we see the compass. Remember that rat that was sitting near the compass? It's only later we learn that rat is the witch's pet.
Borders on Fridge Horror, but there may be a reason Will started to become corrupted by the curse of the Flying Dutchman, even though he does love Elizabeth. It could be because along the way, he came upon some In-Universe Fridge Horror of his own. He realized that with time, Elizabeth would one day grow old and die, whilst he remained a lonely immortal. And one day, she would no longer be on that island waiting for him. So Will stopped seeing his condition as Cursed with Awesome, and more like an outright curse. Thankfully, by the end of the movie, Henry frees him from such a fate, so Will and Elizabeth will grow old and die together.
An alternate theory regarding the curse. Who was it who gave Davy Jones the Dutchman in the first place? Who charged him with The Duty? Who was it who described themselves as contrary, cruel and "untameable as the sea"? Calypso. And who was it who told said grouch sea-goddess her lover was the one who screwed her over in the first place? Calypso's getting back at Will breaking her heart by doing the same to him and Elizabeth.
The beginning parts of this movie show Jack in a sorry state indeed. He's more drunk than usual, "leading" his tiny crew from a docked ship, and has lost sight of himself so thoroughly that he's willing to trade the compass, which had been his most important possession, for a single bottle of rum. But then Henry finds him and pretty much says, "Don't tell me all the stories I heard about Captain Jack Sparrow were all lies." Which, of course, they weren't, because Henry Turner is standing right there, and likely wouldn't exist if not for Jack's exploits. Slowly, as the movie progresses, he starts to get tiny bits of his swagger back. By the end, though, he has the Pearl again and almost resembles the Captain Jack we originally came to know and love. And, perhaps not coincidentally, he met and helped take down the first foe he ever had as captain in the process - a feat that would have reminded Jack (assuming the flashback was accurate) of how he gained respect on the high seas as a pirate captain in the first place. Perhaps the movie wasn't hindered by Jack's less-than-awesome characterization. Perhaps Jack's rediscovery of himself and going from rock bottom to the person he once was, was at least part of the plot of the movie.
When you think about it, after killing Salazar, Barbossa, of all people - the FIRST Big Bad of the series - is at least in one way responsible for the defeats of his successors.
He piloted the Black Pearl into the Maelstrom in the third movie, allowing Will to kill Davy Jones.
Said ship, with the Flying Dutchman, was also able to sink the Endeavor and kill Lord Beckett. Barbossa even ordered the cannons to start firing.
He stabbed Blackbeard with his poisoned blade, and forced Jack to do the Profane Ritual with Blackbeard as the sacrifice.
The aforementioned killing of Salazar.
The film shows in several cases why Barbossa is a better person, and a better Captain for the Queen Anne's Revenge than her previous captain, Blackbeard.
Both rule with an iron fist over the seas, though Blackbeard also terrorizes his crew relentlessly, while Barbossa's men are proud to serve him, if still quite intimidated by his power. This healthier working relationship is also implied when Barbossa expresses some sadness when Salazar kills several of his crew members.
Both possess the ability to control ships, though Barbossa chooses to utilize his captured ships to make his own fleet rather than keep them as trophies, most likely due to the Black Pearl having been in such a situation before. Therefore, Barbossa's crew (or crews) take far more loot and are more successful than the crew working under Blackbeard.
Both end up saving their long-lost daughter's lives at the cost of their own. The main difference is that the selfish Blackbeard was tricked into drinking the wrong chalice and saving Angelica by Jack, while Barbossa genuinely loves Carina and willingly sacrifices his life for her.
Why would Barbossa still dislike Jack in this film (even referring to him as an enemy when talking to Salazar) when On Stranger Tides ended with the two on seemingly good terms? Seeing that Barbossa became the captain of the Revenge and learned how to trap and free the ships from the bottles between films, it's implied that he found out the Black Pearl was one of the ships Blackbeard captured, as he knows about it being trapped when confronting Jack at the wedding. It's likely, after finding out how the Sword of Triton worked, he wanted to try freeing the Pearl, only to find out that Jack and Gibbs had taken it from the ship before he took command. After all these years, they were still fighting over that ship.
As noted on the main page, every ship should have a member of the crew who knows how to navigate by the stars, which makes it weird that Carina and Barbossa are the only ones who know Jack who such a thing. The thing is, Jack's crew has always been assembled in a hurry, after a mutiny, from people who are mad enough to follow CaptainJackSparrow. You know what they say about beggar's choices.
According to Jack's Uncle, it's considered dangerous to go out to sea during a Blood Moon. Why, exactly? Because, back before Barbossa stole the ruby, the island that lead to Poseidon's Trident would open up a rift in the ocean. That would be pretty risky to sail so close to something you could fall in. Even years after Barbossa stole the ruby, it's a legend that's probably stuck until it turned into superstition of bad omens.
Why is witchcraft still punishable by death, when in the Real Life, it was no longer in force at the time? Well, it's been proven so many times that magic, especially voodoo and the like, is a VERY real thing. It wouldn't be unreasonable to think that witch hysteria still existed because reports of all the supernatural happenings in the series were filtered back to the public (perhaps even exaggerated a bit), thus sparking the continued hysteria.
Barbossa is able to use Jack's compass to lead Salazar there because Carina is on the ship with Jack. He's following what he really wants without even realizing it.
Captain Salazar and his crew were trapped in the Devil's Triangle and became vengeful ghosts after they died... because at that time, Davy Jones wasn't doing his job and ferrying souls who died at sea into the afterlife, so of course they had no way to escape.
Why would Jack be so vehemently opposed to the guillotine, as opposed to more barbaric and painful methods of execution? Because the guillotine is a quick, efficient execution. Whenever Jack has avoided death before, he's always had some combination of luck, charm, and friends/enemies planning to rescue him. He's even escaped being dropped from the gallows. Either way, he always needs time. A quick beheading cuts his options rather short, so to speak.
When Henry and Carina break the curse of the Flying Dutchman (among others) by destroying the Trident of Poseidon, did it not occur to Henry that Will might be with the Dutchman at the bottom of the sea at the moment the curse is broken? Humans don't live very long down there, you know...
To be fair, Jack WAS in danger of being impaled to death when Salazar wielded it, so they didn't have time to think about it. Besides, it was the only way they could beat Salazar at that point.
Destroying the Trident of Poseidon broke all the curses in the ocean, not just the Flying Dutchman's. However, not all the subjects of said curses were necessarily good guys like Will Turner. In what could potentially be one of the biggest cases of Nice Job Breaking It, Hero! in film history, Henry and Carina may have busted open every damn can in the Seven Seas. Starting with the return of Davy Jones, if the post-credits scene is any indication...
At least, they should be mortal by now, and not some invincible undead.
Breaking the Trident of Poseidon broke all curses. What it did not do was eliminate magic, good or bad, from the seven seas. Sure all existing curses are null but the Flying Dutchman and its effect on men was only so terrible because Calypso had cursed the position after Davy Jones betrayed her to torment both him and his crew. If not for the curse all you have to do is obey the rules and no detrimental effects come to you. The curse is broken now so Will and his men aren't mutant fish things anymore because they've played fair but the job still exists. Someone has to ferry the souls of the dead to the afterlife and apparently it's not William Turner anymore, which is exactly why Davy Jones is back and just as fishy as ever because he did break the rules by immediately going on land. This opens up a massive series of potential problems because without curses supernatural powers and magic in this world just got a lot more dangerous and difficult to control.