As someone who has cleaned up messes left behind by JOSM's chunked upload used on huge imports... +1000 on this.
I have deleted a couple hundred thousand nodes from failed imports. Not all of them were from JOSM (one big group was from ArcMap) but an appreciable number were.
Perhpas the logic from things like smarter-sort could be reused?