I mean, they actually had science advisers who assisted the writing staff, and they listened to them. My understanding is that the story writers will gave the science writers/advisers scripts where portions looked like so:
Science Officer: Captain, the tech is teching the planet, and if we don't do something, everyone will die in the next 24 hours.
Captain: Engineering team, I want some answers
Engineer: Well, if we tech the ship's tech emitters, we should be able to restore the planet's tech, but only if we can get the Borg off of level 21 so we can manually configure the emitters
Then the science guys replaced all the tech with something that made sense and was consistent with previous storylines.
Movies that don't listen to their science writers or don't even have them are so much worse. I'm looking at you Armageddon and The Core