Since you have a number of criteria, I had to go through each one by importance to find the best build (or builds in this case). You can find a TL;DR below with a description of my methods after.
TL;DR
The best build optimizing:
- DPR using shillelagh
- Effective HP
- Uses for Wisdom
Race: Envoy Warforged (secondarily: Simic Hybrid or Hill Dwarf)
Class: Ranger
Ability Scores: 8/16/16/8/16/8 (or 10/14/16/10/16/8 for 2 less EHP, non-Warforged also use this latter array)
Level 1: Magic Initiate (Druid): shillelagh spell
Level 2: Dueling Fighting Style, hunter's mark spell
Level 3: technically Gloom Stalker for uses of Wisdom, but Hunter and Monster Slayer are otherwise equal
Level 4: Polearm Master feat
Starting Equipment: (with just starting equipment, Hill Dwarf is a slightly better secondary race)
Scale Mail (not needed if Warforged)
Quarterstaff
Equipment Wishlist: (with this equipment, Simic Hybrid is a better secondary race)
Half Plate (not needed if Warforged)
Shield
First, the DPR without using major resources, here are the best builds for each class:
I allowed for a margin of 20%, so any build that got within 20% of the best build is eligible since it may have other criteria that make up for its slightly less resource-less DPR. I skipped Monk and Sorcerer because they offer strictly less than Fighter and Wizard respectively no matter what build you choose.
You can check out the class name sheets of this spreadsheet for some other builds which were elimintated as well as how these builds were decided
Bard
- College of Swords with the Dueling Fighting Style and the Polearm Master feat.
- Highest resource-less DPR
- College of Swords with the Dueling Fighting Style and the Elven Accuracy feat
- Within 20% if Armor Class (AC) is 23 or higher and you have advantage
- College of Swords with the Dueling Fighting Style and +2 to Wisdom
- Within 20% if AC is 24 or higher and you have advantage
Cleric
The clerics include either magic weapon or elemental weapon
- War or Forge Domain with Polearm Master
- Highest resource-less DPR
- War Domain with Elven Accuracy
- Within 20% if AC is 24 or higher and you have advantage
- Forge Domain with Elven Accuracy (with Elemental Weapon active)
- Within 20% if AC is 20 or higher and you have advantage
- Forge Domain with +2 to Wisdom (with Elemental Weapon active)
- Within 20% if AC is 23 or higher, but only if AC is 24 or higher if you have advantage
Druid
- Circle of Spores with Polearm Master and +2 to Wisdom
- Highest resource-less DPR unless you have advantage and AC is 16 or higher; then it is within 20%
- Circle of Spores with Polearm Master and Elven Accuracy
- Highest resource-less DPR if you have advantage and ACs is 16 or higher; within 20% otherwise
- Circle of Spores with Elven Accuracy and +2 to Wisdom
- Within 20% if AC is 24 or higher and you have advantage
Fighter
- Champion with the Dueling Fighting Style and the Polearm Master Feat
- Highest resource-less DPR
- Champion with the Dueling Fighting Style and +2 to Wisdom
- Battle Master with the Dueling Fighting Style and the Polearm Master Feat
- Within 20% if AC is 21 or less
Paladin
- Oath of Vengeance with the Dueling Fighting Style and the Polearm Master feat (using Hunter's Mark)
- Highest resource-less DPR unless you have advantage and AC is 23 or higher; then it is within 20%
- Oath of Vengeance with the Dueling Fighting Style and +2 Wisdom (using Hunter's Mark)
- Within 20% when AC is 11 or higher, but only when AC is 17 or higher if you have advantage
- Oath of Vengeance with the Dueling Fighting Style and the Elven Accuracy feat (using Hunter's Mark)
- Highest resource-less DPR if you have advantage and AC is 23 or higher; otherwise only within 20% if you have advantage and AC is 13 or higher
Ranger
Each build includes Hunter's Mark damage. I used Colossus Slayer as the Hunter's Prey choice for simplicity, other options are explored later
- Hunter with the Dueling Fighting Style and the Polearm Master feat
- Highest resource-less DPR if AC is 14 or lower when you have advantage, and when AC is 19 or less without; within 20% otherwise
- Horizon Walker (HW) with the Dueling Fighting Style and +2 Wisdom
- Highest resource-less DPR if AC is 20 or higher and you don't have advantage; within 20% otherwise
- Horizon Walker with the Dueling Fighting Style and the Elven Accuracy feat
- Highest resource-less DPR if you have advantage and the AC is 15 or higher; within 20% otherwise unless you don't have advantage and AC is 23 or higher
- Hunter with the Dueling Fighting Style and +2 Wisdom
- HW, Gloom Stalker, or Monster Slayer with the Dueling Fighting Style and the Polearm Master feat
- Within 20% if AC is 23 or lower
without
- Hunter with the Dueling Fighting Style and the Elven Accuracy feat
- Within 20% if you have advantage
Warlock, Pact of the Tome
Each build includes Hex damage. I assumed that you could get one-fourth of your attacks on the target of Hexblade's Curse within short rests for the calculation. I assumed you could hit a second target with Green-Flame Blade on one-third of your attacks
- Hexblade with the Elven Accuracy feat and +2 Charisma using Green-Flame Blade
- Highest resource-less DPR
- Hexblade with the Polearm Master and the Elven Accuracy feats
- Within 20% if you have advantage, but only if AC is 22 or lower without advantage
- Hexblade with the Polearm Master feat and +2 Charisma
- Within 20%, but only if AC is 17 or lower when you have advantage
Warlock, Pact of the Blade
Each build includes Hex damage. I assumed that you could get one-fourth of your attacks on the target of Hexblade's Curse within short rests for the calculation.
- Hexblade with Improved Pact Weapon, Thirsting Blade, and Eldritch Smite for Invocations and the Polearm Master feat
- Highest resource-less DPR
- Hexblade with Improved Pact Weapon, Thirsting Blade, and Eldritch Smite for Invocations and +2 Charisma
- Within 20% when AC is 12 or higher unless you have advantage; then it is only within 20% if AC is greater than 18
- Hexblade with Improved Pact Weapon, Thirsting Blade, and Eldritch Smite for Invocations and the Elven Accuracy feat
- Within 20% if AC is 14 or higher and you have advantage
Wizard
I assumed you could hit a second target with Green-Flame Blade on one-third of your attacks
- Wizard with +2 Wisdom using Green-Flame Blade
- Highest resource-less DPR
- Wizard with Elven Accuracy using Green-Flame Blade
- Within 20% if AC is 23 or less when you have advantage, but only if AC is 21 or less without
Now let's eliminate any class whose best builds can't step to the better classes
You can check out the "Classes" sheet of this spreadsheet for which builds were considered
Going down the list...
- The best bard, cleric, and druid builds do not meet the 20% threshold of the best fighter builds
- The best fighter builds stay within the 20% threshold of the best paladin builds when AC is 14 or higher (during advantage) or when AC is 17 or higher (without advantage)
- The best fighter and paladin builds do not meet the 20% threshold of the best ranger builds
- The best Pact of the Tome warlock builds do not meet the 20% threshold of the best ranger builds
- The best Pact of the Blade warlock builds challenge the best ranger builds on approximately the same level (the ranger builds are better at some ACs or advantage-statuses, and the warlock builds are better at others)
- The best wizard builds do not meet the 20% threshold for the best builds among either Pact of the Blade warlocks or rangers
Our final builds (weeding out the weak Ranger and Warlock builds)
You can check out the "Warlock vs Ranger" sheet of this spreadsheet for which builds were considered, as well as which builds are better with which combinations of AC and advantage
After placing the Ranger and Warlock builds into the same pool, and only accepting builds that satisfy the 20% threshold of at least half of the Armor Classes and advantage-statuses between AC 14 and AC 20 (where most enemies will be at level 5), these builds remain:
These builds are in order of the number of AC/advantage-statuses they satisfy the threshold for, with more weight placed if they have the highest value and slightly less value placed on advantage
- Hunter Ranger with the Dueling Fighting Style and the Polearm Master feat
- Hexblade Warlock with Improved Pact Weapon, Thirsting Blade, and Eldritch Smite for Invocations and the Polearm Master feat
- Horizon Walker (HW) Ranger with the Dueling Fighting Style and the Elven Accuracy feat
- Horizon Walker Ranger with the Dueling Fighting Style and +2 Wisdom
- HW, Gloom Stalker, or Monster Slayer with the Dueling Fighting Style and the Polearm Master feat
Second, the additional damage per day gained using other resources
Each of the five builds we arrived at have passable resource-less DPR, but they each have features that allow for other damage-increasing effects usually one or a few times before a short or long rest. It is all but impossible to evaluate which is best, so I will just give my thoughts:
- The Hunter Ranger with the Dueling Fighting Style and the Polearm Master feat has no extra damage throughout the day, but is the best overall damage (especially if you are in a campaign where you can take advantage of Giant Killer or Horde Breaker frequently, which can have more DPR than Colossus Slayer in the right situations)
- The Hexblade Warlock with Eldritch Invocations and the Polearm Master feat can use Eldritch Smite about 6-8 times per adventuring day and if you save them primarily for critical hits can deal about 70 extra damage throughout the day
- The Horizon Walker Ranger with the Dueling Fighting Style and the Elven Accuracy feat is only better than the Hunter Ranger above if you expect to get advantage more often than not; It also lacks additional DPR from other resources.
- The Horizon Walker Ranger with the Dueling Fighting Style and +2 Wisdom is only better than the Hunter Ranger and Horizon Walker Ranger above if you expect to have monsters of very high AC (22 and above) and don't expect to have advantage that frequently.
- If you are going to use a non-Hunter Ranger with the Dueling Fighting Style and the Polearm Master feat, you should either choose the Gloom Stalker or Monster Slayer. The Gloom Stalker gets an extra attack during the first turn of every combat, and the Monster Slayer gets to deal 1d6 damage per attack against one creature per short rest. Each of these bonuses will usually about catch them up with the builds above in most games, but in the right style of game they can even take the lead.
Now, let's talk effective HP
Since all of these five builds are approximately equal when it comes to damage output, let's evaluate them based on your second criteria. The following table shows the effective HP (EHP) for an optimized version of each of our builds:
HW = Horizon Walker; GS = Gloom Stalker; MS = Monster Slayer
\begin{array}{c|r|r}
\text{Build} & \text{EHP with best starting gear} & \text{EHP with best mundane gear} \\ \hline
\text{Polearm Hunter} & 141 & 184 \\
\text{Polearm Hexblade} & 122 & 161 \\
\text{Elven HW} & 116 & 160 \\
\text{Wise HW} & 141 & 184 \\
\text{Polearm GS/MS} & 141 & 184 \\
\end{array}
I used this spreadsheet to calculate EHP, which assumes, among other things (source)...
- 75% of damage is physical, divided evenly between bludgeoning, slashing and piercing
- 25% of damage is elemental, divided evenly between all ten elements
- Characters are being attacked by creatures with attack bonuses and spell DCs that follow the DMG guidelines for a creature with a CR equal to character level – 2
- 80% of attacks are made against AC
- 10% of attacks require a Dexterity Save
- 5% of attacks require a Wisdom Save
- 5% of attacks require a Constitution Save
- A negligible amount of attacks require a Charisma, Strength or Intelligence Save
As you can see, the Warlock build falls behind the Rangers when it comes to EHP. Furthermore, the Elven Horizon Walker can't keep up because of the race restrictions of Elven Accuracy.
- The best race to be for Effective HP is an Envoy Warforged. You assign point buy and racial modifiers so that your ability scores are 8/16/16/8/16/8. This gives you an AC of 18 (20 with a shield), Maximum HP of 49, and resistance to poison.
- note: you only lose 2 EHP if you go for 14 Dexterity and you can have two of your lesser stats at 10 instead of 8
- The Elven Horizon Walker's best alternate is a Sea Elf. You assign point buy so that your ability scores are 10/16/16/8/15/8 and then increase Wisdom with Elven Accuracy. This gives you an AC of 16 with scale mail (19 with half plate and a shield).
- The Warlock still uses the Warforged, but simply has less HP from his class, and worse starting equipment.
If Warforged are not an option for your table, there are two races to substitute depending on what equipment you get:
Simic Hybrid (10/14/16/10/16/8) gets +1 AC from Carapace and results in this table:
\begin{array}{c|r|r}
\text{Build} & \text{EHP with best starting gear} & \text{EHP with best mundane gear} \\ \hline
\text{Polearm Hunter} & 123 & 182 \\
\text{Polearm Hexblade} & 84 & 159 \\
\text{Elven HW} & 116 & 160 \\
\text{Wise HW} & 123 & 182 \\
\text{Polearm GS/MS} & 123 & 182 \\
\end{array}
Hill Dwarf (10/14/16/10/16/8) gets +5 HP from Dwarven Toughness and results in this table:
\begin{array}{c|r|r}
\text{Build} & \text{EHP with best starting gear} & \text{EHP with best mundane gear} \\ \hline
\text{Polearm Hunter} & 125 & 174 \\
\text{Polearm Hexblade} & 89 & 154 \\
\text{Elven HW} & 116 & 160 \\
\text{Wise HW} & 125 & 174 \\
\text{Polearm GS/MS} & 125 & 174 \\
\end{array}
The armors for these non-Warforged builds are Scale Mail for starting equipment (Leather for the Warlock), and Half Plate for best mundane.
With the considerations of EHP, the optimal builds for your criteria are narrowed down to:
- Hunter Ranger with the Dueling Fighting Style and the Polearm Master feat
- Horizon Walker Ranger with the Dueling Fighting Style and +2 Wisdom
- Gloom Stalker or Monster Slayer with the Dueling Fighting Style and the Polearm Master feat
Although, I'd recommend against the Horizon Walker Ranger with the Dueling Fighting Style and +2 Wisdom since it is only as effective in damage output when Armor Class is 22 or higher.
Which Polearm Dueler to choose (Hunter, Gloom Stalker, or Monster Slayer)
We've addressed your two main criteria and come to the conclusion that a Warforged (or Simic Hybrid/Hill Dwarf) ranger with the Dueling Fighting Style and the Polearm Master feat is the most fitting. As we've shown, the three Ranger Archetypes Hunter, Gloom Stalker, and Monster Slayer all are relatively equal. First of all, you should choose the one that is more fitting of your campaign.
- If you expect to be able to gain great advantage from one of the Hunter’s Prey features then you should choose Hunter.
- If you expect to have many combats throughout the day, you should choose Gloom Stalker to benefit more from the extra attack of Dread Ambusher.
- If you expect to have many short rests to refresh your uses of Slayer’s Prey and expect mostly single enemies as combatants, you should choose Monster Slayer.
If you don't expect any of these to present itself more than any other, then we move to your bonus criterion:
Actually having a use for my Wisdom score besides whacking with Shillelagh
If this is the last criterion, then Gloom Stalker is best.
- Dread Ambusher gives a bonus to initiative based on Wisdom
- Gloom Stalkers get disguise self, and the investigation DC will be based on Wisdom