Yes, but a servicing mission for replacing the memory would still be an unlikely operation to be able to do. The most likely use for the docking port is if the electronics onboard exceed their design life, but JWST is running out fuel (to maintain its position at the Lagrange point) so they basically strap a "jet pack" on to the satellite to keep in operation. This has been the business case of some companies trying to do this for GEO satellites:
https://astroscale.com/astroscale-u-s-enters-the-geo-satelli...