If the coil pack connector is loose or broken, that can cause your misfire if it loses contact.
Sounds like you are in need of a set of new coil pack connectors, possibly injector connectors if not a good clean on both the connector and injector itself.