Getting back to the OP a bit since this thread has gotten a little off track, I think. Let me give an example of the research and design work I was talking about regarding “vitamins”.
In front of me there is a computer keyboard. It required an immensely deep industrial base to construct: it’s made from a high quality plastic, which was injection-molded with big hydraulic presses and precision, CNC-made dies. The letting was printed on with some advanced machine. The keyboard controller is some custom bit of silicon. It has a printed circuit board that went through dozens or hundreds of automated steps to make. It has some stickers with high quality printing and some specific adhesive. It’s held together with screws made from steel, rolled threads, and a custom head cutting machine. It has internal springs made on another custom machine from special spring steel. And so on. To reproduce this entire chain of equipment would be impossible with just a million people.
And yet, it’s just a keyboard. It’s a pretty simple device if it doesn’t have to be quite as pretty. The plastic parts can all be 3D printed. The plastic itself can act as a spring. It doesn’t need a full-blown PCB: conductive plastic could be used for the traces, since they don’t have to carry much current (conductive plastic has a high resistance, which is just fine for button traces). Instead of screws, plastic clips.
There is still the matter of the microchip. They’re lightweight, so we could just bring a bunch. But a better idea is to bring something more generic, like the Arduino-compatible I have sitting next to me. It’s 72 MHz, 32 bit, has a built in power supply, USB controller, a bunch of IO pins, and a ton of other stuff. It’s probably 100x as expensive as the custom chip, but it can be used for basically any embedded application. It would be trivial to use as a keyboard controller.
The whole board is the size of a postage stamp and weighs under 3 grams, so if our shipping costs are $1000/kg (above what SpaceX intends to hit), it still only costs $3 to ship to Mars (that’s actually less than the cost of the device, though it would be cheaper in quantity). The average person might need 10 of these a year for various embedded applications, whether keyboards or thermostats or spacesuits or whatever. That’s basically nothing. Everything else in the keyboard can be produced locally (even the plastic, but if not the plastic can still be recycled from old, broken devices).
If that’s not enough horsepower, I also have a Raspberry Pi Zero W sitting next to it. It weighs 9 grams and is powerful enough to use as a desktop computer, or various other serious applications. It’s a lot less powerful than a normal laptop of course, but it’s cheap, weighs almost nothing, and has a power supply and display controller and USB hub and a zillion other features.
These are just examples of course; something destined for Mars could be made better yet. But they do have an advantage in that they already have a ton of software written for them and are designed to be easy to work with. They are too small to be easily repaired, but that’s ok–they’re so light and cheap that you ship a bunch. And they’re all interchangeable so if one goes kaput, you just grab a spare from the stocks, and never have to worry if you’re running low on that one special component.
The hard part here is that someone has to design the keyboard and the many thousands of other devices that would be needed by a civilization with a decent standard of living. I could probably design one in a year, but that implies many thousands of man-years of work in total. Someone has to do all this, and someone has to pay for it–which might be tricky since on Earth we already have injection molding machines and all that, and no one wants a keyboard that’s worse than the crappiest $5 special that also costs $50 in plastic and other components and takes many hours to print. It’s only relevant if you’re in a place where you don’t have access to all the niceties of an industrial base with billions of workers.