Any of the direct drive motors will do it, or the larger gear motors. But the more you weigh, the more you need the quicker self cooling of a direct drive, so you don't heat soak it during the climb. This applies only if you are relatively light, under 250 pounds for sure, So 100 kilos ok, 125 kilos no
The better DD motors will do that climb, with enough power, so they never heat soak. A larger dd motor ( wider magnets than 28mm) run on 2000w, such as 48v 40 amps, will scamper up that hill fast enough to never overheat. This will work even if you are well above 125 kilos weight.
Above 10%, even for the short bit, best to up the power as Mad Rhino commented. At least 2000w is nice. But the 500w geared motors are best kept under 1500w. But again, if you are not heavy, a larger geared motor can be run on 1500w, and get you up that hill reliably. When I ride dirt, I do a few hundred feet of 15-25% grade, with most of it 4-8%, and some occasional very short 15%. By the time I ride about 5 miles, I generally turn so the motor can cool off on the downhill. Total climb only about 1000' vertical, but lots of ups and downs.
If you slow to less than 10 mph under full power, then you need more watts for sure!!!! If this is for trails too difficult to ride that slow, then you have some problems. But since the steep bits are so short, it should still work as long as most of the trail can be run at 12-15 mph, where the hub motor in 26" wheel is still moderately efficient. It's very clear that 8-10 kph under full load is WAAAAY too slow for it to be efficient.
If the trail is too difficult to ride that fast, just too rocky or twisty, then it's mid drive trail. Or, a smaller rear wheel can help a LOT. But if you are slow because it's all the motor can do, then you need a lot more motor for sure. One able to haul your 175 kilos, or whatever total bike weight with rider is, at more like 20 kph. Slower is fine for the short steep bits, but you can't crawl up the whole hill.