Foreword
As RevenantBacon points out, however we do this, there are likely to be other, less expensive ways of doing the same thing using magic or siege weapons. That said, lets see how well we can do.
Method
We want a PC to open a 20x20 hole in a stone wall 10 ft. thick. A wall of hewn stone 10 ft. thick has 1,800 HP per 5x5 ft. square. Once our PC demolishes a section of wall, he can change targets to another section of wall with any remaining attacks in the same round. With a 5 ft. step each round, he can always remain in range of at least two remaining squares.
The wall isn't subject to critical hits, so those aren't included. A natural 1 still misses on every attack, so we'll assume that for every 19 hits, he'll miss once. So we'll figure out how many attacks it takes to destroy one square, then multiply by 16 (the number of squares) to figure out how many total attacks we'll need. We'll then divide by our number of attacks per round to figure out how long it will take.
I'm avoiding most abilities with limits measured in rounds like a barbarian's rage or a bard's inspire courage. This is for a couple of reasons:
- Many of them don't last long enough to get through the wall.
- Our PC is probably going to be fighting a lot of people after he breaks through the wall. He might need to save limited-use abilities for those fights.
Weapon Damage
Baseline
We'll start with a lvl 20 fighter wielding an adamantine heavy pick in two hands. He has 23 Str (started with 18 Str, all ability boosts in Str) for +9 damage. Weapon training with a heavy pick adds +4. With that, he deals:
3.5 average dmg from pick + 9 Str + 4 weapon training = 16.5 dmg per attack
1,800 HP / 16.5 dmg = 110 hits per segment
16 segments * 110 hits * (20 attacks / 19 hits) = 1,853 attacks
1,853 attacks / 4 attacks per round = 464 rounds
But we're just getting started...
Feats
Power Attack grants +15 dmg and doesn't change the fact that we only miss on a natural 1.
Gate Breaker from Path of the Hellknight adds our Str modifier to the damage again, for +6 dmg.
Greater Weapon Specialization adds another +4 dmg.
All together, we now have:
16.5 base + 25 feats = 41.5 dmg per hit
This cuts it down to 44 hits per segment, for a total of 742 attacks or 186 rounds.
Magic Items
Making the pick a +5 adamantine heavy pick adds +5 dmg.
A belt of giant strength +6 adds +6 Str. Reading a manual of gainful exercise +5 for another +5 Str, or 34 Str total. With 34 Str, our two-handed weapon dmg increases from +9 to +18, and our dmg from Gate Breaker increases from +6 to +12.
16.5 base + 25 feats + 20 magic items = 61.5 dmg per hit
We're now at 30 hits per section, for a total of 506 attacks or 127 rounds.
Changing Weapons
So far we've been assuming that picks are the only weapons that can damage a hewn stone wall. However, the text reads:
Likewise, most melee weapons have little effect on stone walls and doors, unless they are designed for breaking up stone, such as a pick or hammer.
If we swap our heavy pick for a warhammer, our damage die increases to d8 (a greatclub isn't made of metal, so it can't be adamantine). Since warhammers are bludgeoning weapons, we can trade a +1 enhancement bonus for the smashing property, giving us +2d6 damage vs. objects (or +7 on average). Using a +4 smashing warhammer, our damage is:
17.5 base + 25 feats + 26 magic items = 68.5 dmg per hit
We're now at 27 hits per section, for a total of 455 attacks or 114 rounds.
Sneak Attacks?
Introduction
As @annoying imp points out, there's some debate over whether objects are vulnerable to sneak attacks. The object rules don't seem to say anything about precision damage. The Vandal feat for goblins suggests that they're not affected. On the other hand, animate object turns an object into a creature with the construct type, and constructs are vulnerable to sneak attack. Since your GM might rule either way, I've split sneak attacks off into their own section.
Rogues and Slayers
We'll start by changing from lvl 20 fighter to lvl 20 rogue. We lose the +4 from fighter weapon training and the +4 dmg from Greater Weapon Specialization, and our Power Attack damage drops to +9 because of a lower BAB. However, we gain +10d6 sneak attack damage on each hit. We also lose one attack, for a total of 3.
13.5 base + 15 feats + 26 magic items + 36 average sneak attack = 90.5 dmg per hit
We're down to 20 hits per section, for a total of 337 attacks. However, since a rogue only gets 3 attacks per round, it still takes 113 rounds total.
If we use a lvl 20 slayer instead, our sneak attack damage goes down to +6d6. We can bring that up to +7d6 with Accomplished Sneak Attacker. Our average sneak attack damage is 24.5, but our BAB is back to +20, so we get +15 from Power Attack and four attacks again.
13.5 base + 21 feats + 20 magic items + 24.5 average sneak attack = 79 dmg per hit
We're back up to 23 hits per section, for a total of 388 attacks. However, with 4 attacks, we're down to 97 rounds.
Two-Weapon Fighting
Let's try a lvl 20 rogue using a +4 smashing light mace in each hand. We're still focusing on Str. Gate Breaker still gives +12, but Power Attack drops to +6 on the main hand and +3 on the off hand. With Double Slice, we still get our full Str bonus on off-hand attacks. Our damage is:
3.5 light mace + 12 Str + 12 Gate Breaker + 6 Power Attack + 4 enhancement bonus
+ 7 smashing + 36 sneak attack = 80.5 damage per main-hand attack
3.5 light mace + 12 Str + 12 Gate Breaker + 3 Power Attack + 4 enhancement bonus
+ 7 smashing + 36 sneak attack = 77.5 damage per off-hand attack
With Greater Two-Weapon Fighting, we get 3 attacks with each hand per turn. The feat requires 19 Dex, so it might seem like we'd need to drop our Str to achieve this. However, if we substitute a +6 belt of physical perfection for our old +6 belt of giant strength, we only need a 13 Dex at character creation. Perfectly doable.
It turns out that the difference in damage between the hands doesn't change how many hits it takes to destroy a segment - alternating hands, it takes 23 hits to destroy a segment. The total is still 388 attacks, but with 6 attacks per round, we're down to 65 rounds total.
Alchemists
Alchemists have the very rare ability to gain an alchemical bonus to Str with their mutagens. With Grand Mutagen, they can get another +8 to Str, for a total of 42 Str.
The Vivisectionist archetype for alchemists replaces their bombs with a rogue's sneak attack. It's banned in PFS, but we can use it here.
The Master Chymist prestige class is designed for melee alchemists. It has full BAB progression, so a Vivsectionist 11/Master Chymist 9 has a BAB of +17. That gives us a fourth main-hand attack and brings Power Attack back up to +8/+4. Master Chymist also has the Brutality class feature, adding +6 to damage with simple weapons (including light maces). With Accomplished Sneak Attacker, we also have +7d6 sneak attack damage.
3.5 light mace + 16 Str + 16 Gate Breaker + 8 Power Attack + 4 enhancement bonus
+ 7 smashing + 6 Brutality + 24.5 sneak attack = 85 damage per main-hand attack
3.5 light mace + 16 Str + 16 Gate Breaker + 4 Power Attack + 4 enhancement bonus
+ 7 smashing + 6 Brutality + 24.5 sneak attack = 81 damage per off-hand attack
It now takes 22 hits to destroy a segment. The total is 371 attacks, and 7 attacks per round gets us down to 53 rounds total.