We've never done this on any significant scale with success.
Think of it more like a nuclear submarine with a greenhouse full of potatoes attached -- we can most likely do that.
Nobody's going to try to launch an entire mangrove forest on the first go. Biosphere2 is a failure of experimental design, not a failed experiment.
Maybe, but if we want to make Mars economically self sustaining the correct analogy is nuclear submarine that never surfaces and can totally self repair, including building new nuclear reactors and eventually replace all parts in itself.
There was Biosphere 2 experiment few decades ago, but they could not keep the biosphere stable.
There's just a huge psychological difference between knowing that you're in space, millions of miles from Earth or any kind of help and knowing you're in a simulation on Earth.
I suppose it's possible to fool people that they're in the former while actually being in the latter. But the ethical issues surrounding such an experiment would make it out of bounds for NASA. It might make for a fun scifi story, though.