Store your hotbar inside a bundle! Then swap between saved hotbars using the custom bundle enchantment, "Toolbag."
Saves empty slots as placeholders. Updated to work with custom items with higher max_stack_size amounts (likely will work with other custom components too).
1.21.5
Fixed bug when manually placing enchanted toolbag inside enchanted toolbag that caused duplicates to appear