Solved!
We finally got the stall speed down to where it should be. It turned out to be a combination of two separate issues that influenced each other. The wing leading edge contour was not correct and the flap leading edge contour was not correct either. The latter deviation was not visible even with templates, but showed itself by tuft tests. The flap upper surfaces had completely turbulent flow at full flap deflection. We sanded the flap leading edges until they were nice and round, and it got the flow reattached.