It probably depends a bit on how much work you want to do with the units and how you want the units to look!
I've not used the rules myself, but if they recommend an 80mm frontage, then an 80x40 base will comfortably fit a full 30 pack of figures if you fill the base. However, you probably want a bit of space around the figures rather than cramming them in. I find on an 80x40 3 ranks of 7 figures works quite well, there's enough space there if you want to add a few command figures out front or back (though I've generally included in the lines).
Not for the Punic Wars but rather the Trojan War, it will give you some sense of what 3 ranks of 7 looks like on an 80x40:

For a more dense order look this could easily go to 3 rows of 8 though.
For 40x40 bases, you could go as dense as 16-20 figures, but I'd normally go with 3-4 rows of roughly 4 figures each for more irregular ordered troops, with maybe 2-3 rows of 5 each for close order, then the full 20 or (at a real squeeze) you could get up to 25 on a 40x40 edge to edge for denser blocks. Wouldn't really recommend 25 though, would be very fiddly.
I've not done Punic Wars yet, but when I do I'm planning to follow something very similar to what Paul has done with his. I've been working on a couple of projects using smaller basing (i.e. typically 40x20 per infantry, 40x30 cavalry, with a few 40x40 for deep or special units) and I'm fairly happy with the effect.
I actually go into some depth on my own basing thinking in what has proven to be my most popular blog post so far:
http://mmcvhistory.home.blog/2020/04/14/the-great-basing-debate/ where I do pay some consideration to Romans and how I'd approach their basing.
Most rules that work on frontages can be easily adapted to suit different basing styles, such as halving distances if going to 40mm frontage, or converting inches to cm. So ultimately it will depend most on:
a) how much time you have to paint
b) how many figures you're willing to paint
c) what is aesthetically pleasing to you
I've found I'm happy to use a reasonably dense figured 40x20 as a unit in it's own right for the moment when space and time is limited. In future, if I have more space and more time I may go back to bigger units, but if aesthetically happy with the smaller ones, there's no reason to go bigger.
At the end of the day, until you get some figures and start sticking them to bases in different arrangements, settling on an idea, sleeping on it, coming back and rearranging them all a few times, scratching your head, scarpping it all and starting with a new arrangement and finally saying "screw it, let's just commit to this and run with it" then start painting them and go back to the idea you had 2 steps previously, you'll not know for sure...