for the enormous cost of servicing the Hubble it could have simply been replaced,
No, there's not enough pork in a new telescope for Congress to pass funding, which is why Webb took so long to get funded. To dig a tunnel out of prison you might want a boring machine, but if all you have is a shovel you'll use that. NASA was stuck using a spoon because that was all that Congress would allow. The most disappointing thing that we learned from the entire Hubble mission is that while they wouldn't even pay for basic maintenance on Hubble until NASA had grovelled sufficiently and promised even more giveaways to the Pentagon, they gleefully purchased so many Hubble-class telescopes for the National Recon Office that the NRO couldn't even use two of them.
If Webb ever needs servicing it will be abandoned, since Congress will never budget the funding for the R&D in time to prevent minor malfunctions from cascading into complete failure. There just isn't enough pork in it.