Would take a lot of prep missions, and might not be worth the cost, but in theory it's doable. Curiosity massed 900 kg and Perseverance massed 1025 kg according to Wikipedia, so dropping a metric ton of supplies for the robot to assemble would, again in theory, be feasible. (In practice the equipment for landing the supply crates safely would take up a good chunk of the mass budget, but there should be something left over in the mass budget for the crates to contain).
Now, if someone does perfect a general-purpose, AI-driven robot, then yes, sending that robot on the Mars mission instead of a human would make a lot of sense. That's kind of, kind of, what we've done already with the rovers. But until such a general-purpose robot is actually created, human beings are still the most versatile, adaptable entities that could go to Mars.