I think there are lots of factors which add up to longbows being amazing weapons when deployed en-mass, but with a number of large strategic costs and limitations which led to their demise.
On top of that, the heaviest bows took a great deal of time to train up to use. To punch through increasingly heavy armor, took increasingly heavy draw weight bows. To use the top end heavy bows, the archer literally had to be trained for years to build up the strength to use them. They were so heavy that it literally left skeletal changes on the archers, and the heavy ossification that resulted took years to build up.
The training and physiology has been mentioned above, but I think is one of the more important.
If you want to field longbowmen, you need to start training about a decade before the war.
Your pre-war training rate is a hard cap on your supply of new recruits for the whole war, whereas with crossbows or muskets you can draft people and have a functional unit in a matter of months.
Even if you win every battle and don't lose any longbowmen to direct combat, you'll still lose them over time from disease, desertion, or accidents. If your training rate isn't high enough to counter attrition, you'll lose strength over time. If you do lose a battle or skirmish, any longbowmen you lose are more or less irreplaceable.
Another thing I remember reading that producing arrows was a bottleneck for English armies.
It's a multi-step, multi-material process, you need an arrowhead, a shaft, and the fletching. The fletching needs glue, a protected space to dry, and time. I'm not sure to what extent archers made their own because of this. I'm not sure if it would be all that difficult to mass produce them compared with gunpowder, but transporting the arrows would take much more space, as others have mentioned. Volume is just as important as a limiting factor as mass when considering logistics, even in the modern world.
Mass production and industrialisation were concepts that developed over time, so I wonder if arrow production would have been a non-issue in later times.