well, you can take a look at CvPlot::getUnitLimit() and CvUnit::CountStackingUnitsAtPlot()
the former in particular already allows for modification depending on the presence of improvements and other units (not on technology though but that would be an easy addition)
CvPlot::getBestDefender() also works with unit stacks (probably inherited from CIV IV)
so the basics are there, but there are lots of other spots where the AI simply will not put multiple units in a plot, most importantly the tactical AI is built with a 1UPT assumption.
also you might have to fix the UI, plus do a lot of balance changes.
so overall, an interesting experiment but far too late in the project.
personally I don't even feel that 1UPT is such a problem - it's nice to be able to see all units - and there are other ways to combat unit spam, eg reduce supply or increase cost and maintenance.