Yes, but once again this is making the assumption that everything is totally constant, so that when you reach that peak output, you can maintain it constantly and uninterruptedly. Climbs aren't like that. And it's harder to accelerate back to that peak output on a steeper climb because of inertia and gravity, and THAT is where the increased difficulty comes in.
There are exceptions - Torre from Covilhã is 6,3% but mostly consistent, whereas Torre from Seia is longer at 5,1% but harder because it has false flats, small descents and ramps of up to 17% meaning you can't get into rhythm and spend a lot of time accelerating and decelerating. But the general rule of thumb is that, because of this increased difficulty in returning to peak output, the steeper climb is harder.