There are the tools implemented to deal with overflow of production/research. There not perfect but viable none the less.
If I have an overflow of production to shipyard I'll change the sponsors so they can focus on planetary production. Even if there is nothing to build it can boost culture, birth, money etc.
Or more simply split the shipyards which seems slightly more beneficial considering the flexibility to have large production numbers to multiple sources more easily. Instead of HOPING for 3-4 awesome production bonus galore planets.
I am not sure but it would be interesting to know if wonder bonuses apply (such as less logistic cost) to any shipyard that the planet with the corresponding world sponsors. If so that would also be of great benefit considering you could more aptly apply the bonuses by reassigning worlds and also not worry about where you build the wonder.
As far as research, It can be a bit tedious, but In your situation I'd just alter your economy bar further towards money / production to not waste the research points.