Not really. They could have reached a negotiated settlement. Both the first and second Punic wars ended in a negotiated settlement (of course very much in favor of Rome). Carthage would likely have been ok with Rome agreeing that all of Spain would be in Carthage’s sphere of influence. Worst case, they would return Sicily which they gained in the first Punic war.
Rome’s decision to keep on fighting was not one necessitated by survival or maintaining independence.