It is just a matter of engineering*. It's not like we need fundamental new science. Literally everything you said is an engineering problem.
It's just a whole fuckload of engineering.
Here's one way it might go down.
1. Self-sustaining Martian robot "colony". Note we don't have one on Earth, but to be fair we don't need one on Earth nearly so much. This is conceivably something that could be useful even on Earth in extreme environments, or in Earth orbit, so we can get some practice, then adapt for Mars. Again, this glosses over a lot.
2. The robots can now attempt to create a liveable ecosphere. We could even send ahead some plants and animals that nobody would miss to prove the concept.
3. Then the humans come.
Does that sound conservative to you? Because that's how the real space program happened, the one that is often lauded as going so fast compared to now. First we sent machines which had a useful life in space much longer than any human has ever lived in space (thus, self-sustaining). Then came the dog, the monkeys, and finally humans. We skipped the dogs and monkeys on the moon at great risk, but we had already proven:
1. Launch from a gravity well
2. Continuous space habitation on similar timescales to the moon mission
So we had good reason to think we could skip that step. We should work ourselves up to longer-term habitation similarly. The ISS is a good step for long-term habitation with resupply, but we need something with no resupply.
The class of problems that could be solved by humans using only local materials, but would leave us totally fucked with only machines, is pretty small. I can see the argument about useful science, but we're talking fatal emergencies.
* Mayyyyyybe psychology or economics or some soft sciences like that.