Best Class for Flails
Druid reaches the most flail passives: 5 within 20 points of the class start and 10 within 30 (the tree has 10). Next: Warrior (3), Witch (1). The nearest flail notable for Druid is Ball and Chain, 18 points away. No ascendancy node names flails. Patch 0.5.5, from the game files.
All 8 classes for flails
Passives whose text names Flail, within 15, 20, 30 points of each class start; sorted by the 20-point count.
#1
#2
#3
#4
#5Mercenary0 within 150 within 206 within 30+27 One Handed Weapons within 20starts with
Makeshift Crossbow
#6
#7Ranger0 within 150 within 200 within 30+17 One Handed Weapons within 20starts with
Crude Bow· same tree start as Huntress
#8Huntress0 within 150 within 200 within 30+17 One Handed Weapons within 20starts with
Hardwood Spear· same tree start as Ranger
4 flail notables on the tree
Ball and Chainnearest: Druid, 18 pts15% increased Damage with Flails6% increased Attack Speed with Flails
Morning Starnearest: Druid, 23 pts30% increased Critical Hit Chance with Flails20% increased Critical Damage Bonus with Flails

How this is counted
Read from the passive tree in the game files (10 passives name Flail; 27 more apply to One Handed Weapons). For each class we count the passives you can allocate with 15, 20 and 30 points from its start: every passive on the shortest path costs a point, and another class's start can't be walked through. One Handed Weapons passives also work with flails but are shared with other weapons, so they only break ties. Ascendancy nodes count the points from the ascendancy start (8 points in total). Ranger and Huntress, and Witch and Sorceress, share a start, so their tree numbers are equal. Plan the path yourself in the passive tree planner.
