There is another problem — solar winds. They are hyper fast, unpredictable waves of charged particles that are travelling outwards from the sun in every direction. Earth has magnetosphere that protects it from solar winds (that’s why we see auroras on the north and the south regularly) but while spacecraft is travelling in the open space it is exposed to solar winds. Mars’ magnetosphere is not as powerful as ours that’s why it’s surface is likely to be also exposed to solar winds.
Whatever we build to travel anywhere further than earth’s orbit, it has to protect astronauts from solar winds and therefore is likely to be very heavy. So assembling it on the orbit is probably a way to go.