You're right, it is different. Sustaining the war effort abroad in the face of repeated catastrophic defeat is in fact much harder than when the enemy's at the gates, as the lack of clear and present danger to home and hearth is no longer available as the most powerful possible motivation. The fact that the Carthaginians did anyway, and still wanted to continue fighting (though saner heads prevailed in that case), is a testament to the Republic's remarkable military strength. Rome is by no means categorically superior in terms of demographics; certainly not enough to guarantee victory. Let's imagine a second war with Rome, only this time Carthage starts with control of all the islands and the seas. They can raise at very least the ~120,000 men they had at the start of the OTL war, compared to the 60,000 the Romans levied at the start of the war. This time, though, instead of losing strength crossing half of Spain, the Pyrenees, Gaul, and the Alps, they can directly invade southern Italy with their full strength, and quickly reduce coastal cities with their superior navy, enabling a quick and secure advance up the peninsula.
Overseas war is not harder. At all. Rome had several overseas wars where they suffered repeated defeats. Look at its efforts in Spain in the second century BC. It took until 133 BC to fully subdue it. And look at the Macedonian Wars. Rome suffered many defeats before it won. And of course, the First Punic War, which was overseas from Rome and Carthage's point of view, were much easier to wage in comparison to the Second Punic War, which involved devastation to their home countries.
The Romans had 700,000 pool of manpower in Italy, and the losses to the Second Punic War would bear that out. It would stay stay that they will win in Italy. They cannot invade with the 120,000 all at once, while Rome could sustain up to 200,000 men all at the same time. Keep in mind that the Romans sustained 25 legions during the War, and not all of them were in Italy. In this case, all of the would be in Italy.
As for the superior navy, I don't think so. Carthage had a superior navy at the start of the First War, and the Romans had no experience with the navy. Yet Carthage won only two battles, lost almost all the important naval battles, including Aegedes Islands, Cape Ecnomus, and Mylae, while Carthage only won Drepana and one other battle. Rome could easily construct a large navy from scratch and defeat the Carthaginians on their own element.
I don't think it's unreasonable to think that they could do so again in Second War.
But of course, I will concede that Hannibal could have won the Second Punic War had some things gone his way and if Roman nerve did not hold.
For example, it might be possible that Rome might make peace if Hannibal showed up under the gates of Rome while it was reeling under shock of Cannae.
So in the hypothetical second war, if Hannibal or someone of his genius would lead the army of Carthage, Carthage may win the war. But it could also lose.
If somebody else other than Hannibal or someone without his genius? The Carthaginians would lose.