The real problem is that without having the characters go shopping (even if the players don't want to), having the PCs get the equipment they need quickly devolves into railroading, as you so astutely realized already.
So, here are a couple suggestions. You can use them together, I think.
1) Adapt the Weapons of Legacy rules. The PCs find a magic item that seems interesting... make it very flavorful so that one of the players takes a liking to it. Then, as they use it, they unlock more abilities from it, either that you've determined beforehand or that seem appropriate at the time. You don't have to give them a new ability every time they do something cool with it, just at major story points. Give them less treasure to account for the fact that their equipment gets more powerful.
2) Have the treasure they collect go into a fund. Then, as they're out adventuring, they say "crap I wish I had bought one of these" and if it's reasonable you deduct the price from the fund and there they have it. This can get out of hand, so you should limit it to things that will not hit the BBEG's one weakness unless they had IC reasons for knowing to attack that beforehand.
Both of these definitely need work, but hopefully they'll get you started.