What do you consider a 4th-gen engine and a 5th-gen engine?
Upgrading engines is not necessarily a simple, drop-in, plug-and-play effort. A new engine -- especially a new-generation engine -- may require a new transmission; it will certainly require new structural engine mounts and new ECU tuning. The structural changes and the ECU fine-tuning take time and effort, and would be best done when planned changes, like a refresh, is done.
And generational changes (major re-design) of engines do not necessarily coincide with generational changes of models. Major engine re-designs are very costly and so are done only when absolutely necessary (like not being able to meet new emissions regulations).