Are the screws coming loose or is something pulling (hitting/rubbing) on the wires? There could be some vibration causing the screws to loosen but that is more likely to happen at the opener connections rather than the sensor connections. In either case, you shouldn't need to replace the wires.
Replacing the wires suggest that the wires are being damaged and that means something is contacting the wires. Make sure there is plenty of clearance for the door. If you are storing stuff near the sensor wires - either move the stuff or move the wires.