A lot of the cost for space based missions is also in instrument design. When you make a telescope, you don’t need to just design the mirror and the stuff that holds it up, and a camera with a series of filters. You need to design spectrographs and other complex systems that need to be “space-hardened” and extremely well tested. A “sensor package” doesn’t really cut it. See for example this spectrograph:
https://www.eso.org/public/images/ann13071c/
Huge instruments like these that actually power today’s science is another reason why ground based astronomy is required, and why we can’t just move all observation to space if satellite clusters ruin the night sky.