So, it would be __really__ hard for astronauts to swap an SSD.
Because the landing part was the hardest and take more delta V than actually getting to JWST. Not to mention going back from moon surface.
You don't want to fire any thrusters in its direction to avoid damaging the sunshield or the mirrors, but of course to slow down at it you would need to do that at some point.
If the SSD failed and a constant connection to Earth cannot be maintained, the more realistic solution would probably be to launch a satellite to a high orbit to maintain permanent connectivity with JWST which can act as a store-and-forward relay, effectively replacing the SSD without having to actually go to the telescope.
https://astroscale.com/astroscale-u-s-enters-the-geo-satelli...
Presumably they could operate in a reduced mode where it does live transmission of the data when it's in contact with Earth?
[1] "JWST can produce up to 57 GB each day (although that amount is dependent on what observations are scheduled)."