I think the key lies in the word 'just'. That is, feats can be about customisation and about optimisation, but they can't be both about customisation and just about optimization.
I'm not convinced. The most optimal selection of a feat is still customization. It's just not necessarily differentiation, in that everyone is driven toward choosing the same feat and applying the same customizations. But even something like, "+1 bonus on all saves", if it turns out that this is an optimal and even necessary choice, is providing customization and differentiation between those that take it and those that don't. This customization is sadly rendered shallow and trivial, in that instead of choosing a make a character that carries the flavor, "Lucky" or "Hard to Stop", you are really choosing between "Doesn't Suck" and "Sucks". But it is still customization, even if everyone is pushed toward taking it.
the game provides scope for many hundreds or thousands of possible options, but so many of them were just bad. The net effect was that you basically chose the concept you wanted to embody and then most of the other choices just fell out very quickly - if you want an archer then you want one of these three builds, etc.
True, but just being able to say, "I want to play an archer", and their being three very viable options implies that there are hundreds of possible options that don't suck.
The biggest problem 3.X ultimately had was not that it didn't have hundreds of possible options, but that the balance between 'Optimal' and 'Not Optimal' was so poor. The range of possible power levels depending on you system mastery and approach to character building was just too great, which made it impossible to offer advice on game balance and rendered any attempt to consider the question of balance within the context of such an already imbalanced system impossible. Worse, it was seldom obvious how you'd optimize a particular concept - taking 20 levels of fighter to build the ultimate archer probably wouldn't be nearly as optimal as a new player would think. Instead, optimization of a particular concept usually involved combining 3-6 esoteric and sometimes obscure classes with particular feats and items. That's horrible character design, albeit one that probably sells a lot of books to a certain class of player.
But that defeats the point of having all those options in the first place - you might as well just have a single "archer" class with the three choices hard-coded. You don't gain anything by adding hundreds of additional options if they're all bad choices.
Maybe, but its worth noting that 3.X actually did both things simultaneously - offering hundreds of marginal feat options together with hundreds of classes with hard-coded choices in the form of PrCs. The PrCs were an even bigger headache than the feats. And actually, the spells and even the magic items (if you assumed fungible treasure as default) were also a bigger headache than the feats. The net result was a system where it was impossible to evaluate the utility of a feat or anything else without knowledge of everything else in the game, and everything else in the game quickly became too large to easily evaluate even for the publishers. And the net result of that was a system were most builds were junk, and those that weren't tended to be broken (in the sense that they rendered most challenges you'd expect them to undertake trivial).
I personally like feats, and I think that they ought to be the primary vehicle for customization. But I admit that they are hard to design. I think I've got a pretty good feat set in my current homebrew, but I also admit that the feat structure is probably one area I most want to rethink. There are a lot of cases where I think utility could be tweaked.