I think you could connect the concept to an RPG, but you'd have to be intentional about how it shapes the game's world and progression. For example, if there's an area that you can only access with a certain ability and it requires a specific exchange to achieve that ability, that could lead to some interesting problem solving and exploration rewards.
In an RPG, once the player has built a character with strong attacks and abilities, what would be the motivation to swap them out? Just thinking out loud, but maybe it would be more meaningful if abilities were permanently swapped? Or maybe abilities are common and fade over time - so people in the game world are incentivized to swap them out on a regular basis.
I think the concept is interesting, but you'd need some good ideas about how the "swapping" mechanic would make the gameplay interesting. Good luck.