By swapping the coil pack of the incident cylinder with another and have the same misfire code re-trigger, it tells you that the coil pack was not the problem and the misfire is due to something else at cylinder #5. That could be a spark plug, bad fuel injector, circuit issue with either the harness to the coil pack OR the fuel injector, faulty ECM or a mechanical issue with the engine.
Since you replaced the spark plug and it started running well for awhile and then acted up, again, it would likely not be a mechanical issue. It's possible it could be an intermittently failing fuel injector or a harness issue, but you'll have to do some tests. If you want a well laid out diagnostic procedure, you can follow the diagnostics for the P0305 code in the "EC" (Engine Control) section of the factory service manual for your vehicle. You can access a free, online FSM at NICO Club's website.