But a given launch system is deeply intertwined with designing the mission. The size, the weight and the mass distribution.
Moving parts are a nightmare for reliability. Every moving part is something that can cease up and go wrong. It's a motor that can fail and gears that can get jammed.
JWST has two key components that involve a lot of moving parts:
1. The mirror. Hubble was smaller enough to be deployed fully constructed in the Space Shuttle so didn't have to deploy in space. JWST's mirror is 3-4x larger an there's no current launch vehicle that could launch it fully assembled. That's why you have all the beryllium hex mirrors that had to deploy the mirror once in orbit. These motors, actuators, assemblies, etc need to be incredibly precise and reliable; and
2. The heat shield. JWST has to be incredibly cold to operate (5K IIRC). The only way to get rid of heat in space is to radiate it away. The heat shield separates JWST from the Sun, the Earth and Moon (each of which reflect enough light to interfere with operations). The shield is several layers and it's large, like tennis-court sized. Obviously this too had to be deployed in space.
There were like 10 technologies for JWST that had to be invented to make the mission possible. That's less than ideal. It adds to the cost, the complexity and the timelines.
In hindsight it probably would've been worth having a stepping stone between Hubble and JWST that proved some of these technologies in a cheaper and less risky way, probably with a smaller mirror. But here we are.