How is ceding Cardassian territories necessary? Honestly, I think taking away any ante bellum territory would be a very bad idea for similar reasons to those I outlined in the second part of my response. And I am including the DMZ colonies in that. (Though in the case of those planets, if I were the Federation, I'd lean on Cardassia to institute some sort of home rule similar to what's been done for Scotland in the UK: ultimately answerable to Cardassia Prime, but with a higher degree of autonomy.)
I think it would have been necessary, not only from a strategic standpoint, but also from a diplomatic one. Just because they shared a common enemy in battle, that doesn't mean that the Federation's allies are going going to stop looking out for themselves. The Klingons and the Romulans aren't going to just skulk back to their homeworlds while the Feds put the shattered pieces of the Union back together. All the parties involved lost hundreds of millions in the war, and based on what I know about their respective philosophies and customs, these two superpowers are going to expect something more out of it than just a defeated foe. That's not saying it's the right decision for the long term stability, but it is the realistic outcome.