Every kilogram delivered to the lunar surface is expensive enough that sending three single-purpose machines is hard to justify when one set of reconfigurable parts could do all three jobs. That is the argument behind MoonBot, developed at the Space Robotics Lab at Tohoku University under JST Moonshot Goal 3: limbs, wheels and tools that attach on demand, so the same hardware becomes a manipulator, a vehicle, a walker or an excavator depending on what the task requires.
Modularity moves the difficulty rather than removing it. A robot whose morphology changes cannot rely on a controller written for one fixed body, and it cannot rely on a central planner that assumes it knows what is attached. Most of my doctoral work went into that problem: decentralized control and reinforcement learning for a body that keeps changing, and the software that lets the modules work as one machine.