The real problems are two-fold: First, Carthage had a very laudable civilian-military separation of command, unlike pretty much everyone else in the Classical world. The "Hundred" elected generals who had no executive authority, unlike the Romans whose elected executives, the consuls, were the generals in the field, and the various eastern states whose kings served as C-in-C. In Carthage, the winds of politics could wind up defunding a general in mid-campaign, or executing a general after a failure. This tended to keep Carthaginian officers timorous, conservative, and short of manpower.
The second problem is demographic: Rome had something like twice or three times Carthage's population in its core, and more of them were citizens. (The Carthaginians made heavy use of mercenaries, tribal levies, and others -- indeed, Carthaginian law forbade bringing an army of Carthaginian citizens overseas. That's how bad their demographic situation was.) Even adding in reliable levies and auxilia, Italia's population was 5 million; north Africa's was closer to 1.5 million. (Libya, the main source of Carthaginian manpower, had a population a little under 700,000.) For example, in 212 B.C., the Romans maintained 25 legions under arms, and probably an equivalent number of auxilia. That's 200,000 men (or more), six years after Hannibal invaded Italy with an army about the size of Alexander's at Granicus: 38,000 infantry and 8,000 cavalry (and maybe 10,000 Gauls and sech). His army didn't get much bigger in the intervening time period; rather the reverse.
Note, by the way, that Hannibal had the kind of initial victories you'd think some bad SF writer made up, including the complete eradication of eight whole legions at Cannae. (But just four years later, the Romans have 25 legions in the field ... Demographics, my friend.) How do you improve on that? What alternate history hinkery-pokery can you even think of pulling? The most common answer is to reverse the Battle of the Metaurus. In real history, Hasdrubal, bringing reinforcements to his brother Hannibal, sent a letter to that effect that wound up intercepted by the energetic consul Claudius Nero. Who, since he didn't have to worry about second-guessing from Rome, left a screening force to contain Hannibal, marched north, and curb-stomped Hasdrubal in 207 B.C. If the messengers don't go astray, then Hannibal hooks up with Hasdrubal, and smashes the Romans between two millstones. A fourth time. As Sir Edward Creasy notes in Fifteen Decisive Battles Of The World: From Marathon To Waterloo:
When the Metaurus witnessed the defeat and death of Hasdrubal, it witnessed the ruin of the scheme by which alone Carthage could hope to organise decisive success -- the scheme of enveloping Rome at once from the north and the south of Italy by chosen armies, led by two sons of Hamilcar. ... if the armies of that year should be swept off by a repetition of the slaughters of Thrasymene and Cannae, all felt that Rome would cease to exist. Even if the campaign were to be marked by no decisive success on either side, her ruin seemed certain. In South Italy Hannibal had either detached Rome's allies from her, or had impoverished them by the ravages of his army. If Hasdrubal could have done the same in Upper Italy; if Etruria, Umbria, and Northern Latium had either revolted or been laid waste, Rome must have sunk beneath sheer starvation; for the hostile or desolated territory would have yielded no supplies of corn for her population; and money, to purchase it from abroad, there was none. Instant victory was a matter of life and death.But I'm not sure. Hasdrubal did bring with him siege equipment, which supposedly would have spelled Rome's death -- but Hannibal had been losing sieges for a dozen years, and apparently the Carthaginian government couldn't be bothered to shell out for a few Greek engineers to build him some new trebuchets. Hannibal also apparently preferred to bribe pro-Carthaginian factions in target cities to open the gates or slaughter his foes, rather than actually storm fortified positions; this, again, speaks to that first fault of Carthaginian warmaking. Bottom line: Hannibal hated siegecraft, and wasn't very good at it. Thus, the Romans managed to pen Hannibal up in Bruttium without ever beating him in open battle -- much like Kesselring managed to keep the Allies trapped in the Italian heel for two years. Italy's just a hard place to invade, if someone there feels like fighting. Especially if he has you outnumbered by close to 5 to 1.
To his credit, Hannibal realized all this. His (or rather, his brother-in-law Other Hasdrubal's) plan was twofold: address Carthage's demographic deficit by incorporating the Spanish hinterland into its domains (total population 5 million; Carthage never controlled all of Spain, but the Barcids probably put at least half of it under Carthaginian rule) and break up Rome's choke-hold on the Italian peninsula by prying her allies away. In the final eventuality, he didn't have time to do either: He and his father only spent 23 years, all told, incorporating Spain -- Rome spent ten times that period slowly and fully subjugating Italy. And that showed in the other half of the equation: even after three magnificent victories in a row, Hannibal could only recruit about a quarter of Italy's population, and he held much of it gingerly. (Thanks to the kinds of internal divisions he had to exploit to get them to desert Rome in the first place, Hannibal wound up recruiting the most troublesome, disunited, problematic quarter of Italy.) Meanwhile, Scipio Africanus took all of Spain away from Carthage in four years, a third the time it took Hannibal to get even that far in Italy.
So a good, plausible AH has to point in that direction. In "Delenda Est" Poul Anderson kills all the Scipios at the Battle of Ticinus, implicitly retaining Spanish manpower for Hannibal. (And indeed Polybius says that Scipio Africanus saved his father's life at that battle, so there's a minimum of finagling required there.) John Maddox Roberts' fun-and-thunder AH Hannibal's Children adds Philip V of Macedon to Hannibal's allies (another 2-3 million population; Philip did indeed ally with Carthage in OTL, but unwisely didn't send any troops to Italy) before going crazy-pants with an exiled Rome-in-Noricum.
My own preferred AH aims at the first problem. The Barcids were basically independent of the Carthaginian Hundred, thanks to their vast power base in (silver-rich) Spain. (This is just a taste of why Carthage's city fathers were so stingy with the siege enginery -- they suspected, with good reason, that the Barcids wanted to take over and unify the civil and military Bonaparte-style.) In my version, the Barcids hire a team of Greek engineers with some of that silver, and plan to build siege engines in Italy. (Maybe a youthful Hannibal gets sent to the court of Ptolemy III or Antigonos III -- kind of an exchange program with future possible Carthaginian allies -- and sees what a proper siege looks like.) After destroying four legions (at the time, the entire Roman army in Italy) at Lake Trasimene in 217 B.C., Hannibal doesn't try marching around southern Italy fruitlessly inciting revolt. No, he decides to destroy Rome and pick up the pieces afterward. Rome has no army in the field; my Hannibal has almost the entire army he marched in with, plus those shiny new siege engines. He replays Alesia, defeating the returning and recruiting Roman forces in detail while tightening the ring around Rome. (The ground around Rome is comparatively flat -- much better for Hannibal's cavalry and elephants than all those mountains in southern Italy.) Rather than throw one ineffectual spear into the city, he throws the whole might of his army at the schwerpunkt: break Rome, and you break up Italy. After the destruction of Rome in 216 B.C., and a year or two of mopping-up and signing up eager allies, Hannibal makes himself and his brother Hasdrubal the Suffetes of Carthage ... and eventually, the masters of the Mediterranean.