I believe Hannibal’s attack on Rome initiated from his base in Spain. There was no “ocean” between his army and Rome. Granted he crossed the alps but paid a heavy price in doing so
By your logic the US was not fighting an overseas war against Germany in WW I or II because it had bases in England. I suspect some historians would disagree with that assertion.
If there was an ocean between your army and the army of your enemy you could not actually fight could you? If your home country is across the ocean from your enemies home country and you are fighting on the enemies home turf, you are fighting across an ocean regardless of where you have bases.
I think if one could compare the relative GDP of Carthage against the Roman empire and then compare that ratio to the ratio of GDP of France versus it’s enemies you would find the Carthage/Roman ratio to favour the Roman empire more so than the enemies of France.
A puny country Carthage taking on an empire versus in some cases a larger France compared to some of her enemies.