The whole "space is big" thing applies here, you can keep those two bodies super far apart. I don't really see a good reason for that tbh but it's possible. Though if the mission depends on those two bodies traveling together, you better have tons of redundancy or some propulsion systems to recover in case the cable snaps.
Was really thinking of an earth orbiting laboratory setup with a radius of about 250m and rotation speeds of about 2-3 rpm. Need to model it when I have some time. Just to gain actual data on different gravities and durations. The starship has plenty of room for the habs to run experiments on plants and people. Each one has propulsion in case of a cable failure. You’re correct, the cable snapping would be big concern.