Switching between programs is not a problem at all when considering performance. Seeing as that is the cleanest and easiest-to-maintain way, I say go for that.
Always go with the cleanest solutions until you begin noticing performance problems.
Binding a new shader is about expensive as binding a texture. Depending on gpu thought. But sending lot of uniforms is not cheap either. So profiling is only way so know which one is better.
But keep in mind that making multiple shaders that share some amount of duplicate code is maintenance hell. Every time you fix a bug you need to remember fix it from multiple different shaders same with adding new stuff. So if you plan to make many animation shaders I do not recommend this approach.
So after certain complexity data driven systems start to excel. Shaders can be optimized with ifdefs or shader generation if you need to strip away nonused features.