If I understand correctly a magnetic field is created by the exchange of photons between charged particles. Is it correct to assume that the magnetic field lines are the trajectories of said photons between the magnet poles?
No, it would be incorrect to assume as much.
Magnetic field lines are drawn by "connecting" the field vectors at each point so that they form a solid line. This is more or less a visual aid that is useful in calculations, as you can consider "how many" of the field lines pass through a surface to calculate something like flux.
When people say that electromagnetism is mediated by photons, they mean that it is mediated by the photon field of which photons are quanta. This is represented on a Feynman diagram by the exchange of virtual photons but this should not be taken too literally. See the answers here and here for more discussion. Once you get to the level of talking about how a force is mediated by quanta, you are considering a quantum theory where the idea of a definite trajectory gets a bit murky.