Cassini at Saturn has sampled geysers although it wasn't designed to do it. The orbiter NEAR Shoemaker was soft landed on its asteroid. Two examples of how interplanetary probes have been partly repurposed while in flight, there are certainly many more subtle ones.
What could be done to make for example the proposed Europa clipper so flexible that it could reconfigure itself in order to follow up on unexpected discoveries instead of having to wait for a completely new probe? Do we still need to keep it simple in order to achieve reliability?
What about reusable orbiter platforms? Somewhat like a space station or a Mars cycler. A platform which once put in orbit then is gradually upgraded and redesigned during many decades. The simplest might be to just launch a radiation shielded platform to Jupiter orbit once and for all, to which several probes could dock one after the other during many decades. The extreme would be to have a probe factory in orbit of an outer planet which only needs the low-weight high tech instrument components and fuel sent to it from Earth, in order to be redesigned to whatever kind of probe is desired next.