I know that in an atmosphere, you don't want your expansion ratio to be too high, or it will cause some big problems, and that vacuum engines are restricted by the space they have to fit in, but if we built a rocket in a vacuum, exclusively for vacuum use, and we could make the nozzle as long as we wanted, would there still be a maximum expansion ratio that's worth having? Is it simply a matter of weight?
It would take an infinitely long nozzle to drive the exit plane pressure to zero. Real nozzles get cut off for reasons of weight and packaging. Even ignoring that, at some point, the tiny gains from extending the nozzle past a certain exit plane pressure value just aren't worth it.
The biggest expansion ratio I could find was 280:1, and that took a multi-part moveable nozzle to implement.