What i would do is create an instanced zone like eureka/bozja. In this content instead of upgrading your weapon, you just need to collect a certain resource. This can be the fates, killing special enemies, special duties. Upon collecting enough and turning it in, it then allows you to upgrade the weapon. And for the job you are playing give you the weapon upgrade directly (if grinding further, you can do multiple weapons this way). Basicly once you completed the content and reached the story end, you can get the maximized weapon already through tomes.

For those special zones, instad of putting the special stats on the weapon, i would instead create a new inventory slot (basicly replacing the belt slot) that tracks upgraded (zone specific) stats in it (no need to bother with melding after all). This specific stat stuff doesnt need to be an actual inventory slot, its just there to display the bonus stats you aquired and not make it tied to any gear (removing the need for a lot of gear pieces). This on that can extend the content to get something well beyond the end of its story, preventing the situation in which to truly maximize the weapon, you are forced into a huge grind. This grind is now only for the instanced 'item'.