Easy method: Assign each mod a 100's number. Start with 500.
So, mod 1= 500, mod 2=600, etc.
Each mod uses those numbers for their ID's. That way no mod will overlap. Mind you, there's going to be some tricks involved, you actually WANT Railcraft to, for example, over-write the vanilla rails. But largely, this will ensure there are no conflicts.
That would get you up to 8500 or so, which would be getting close to, but within, the limit.
From there, you can condense as needed. Maybe put all the mods which only add one or two ID's into the same hundreds slot. That sort of thing.