Yanfly JP + Item Upgrade Slots

I wonder if and how it is possible, to spend the earned Job Points (JP) to add more Upgrade Slots to a weapon or armor.

Like.. you start with your sword having 2 slots on default.
While you fight enemies you gain JP.
Then you spend the earned JP to add a third slot to your sword (no need in the menu, can be via NPC etc).

Is it possible?
How would that be done?
Any help would be awesome!
It is not possible to have dyamic slots(aka changing the number of slots on an equipment) with Yanfly Upgrade Slots.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-jp-item-upgrade-slots.79379/