I think an ideal ending would have the machines tell Neo that he can tell the humans about the real world and how to escape. Neo does so, but it turns out there's a mental failsafe now that they don't want to leave and will enforce the machines at all costs. Neo tries to get out to fight the machines, but is trapped inside. Then the matrix is rebooted.
Or not...