A "Cap" item could be crafted from wool and carpet, likely red based on most of Ash's past hats. If you want to make it harder to find, you can throw in a thunderstone to the recipe, make it exclusive to boss drops, or even make it only from electric-type bosses. It depends on how rare you want the item (and thus the form) to be.
Once the "Cap" item is obtained, it could be put in the crafting grid on its own to cycle between different forms, starting with Blank to Original, Original to Hoenn, and so on. once you reach the World/Galar Cap after Alola, it swaps to the Partner Cap then back to original. This way any hat you want can be obtained to allow you to change the form.
Alternatively, you take the blank cap and craft it with various dyes to make a design similar to that on the cap, such as a single cactus green for the original, 2 for the Partner cap, etc. You could possibly reset it to blank with the cap on its own in the grid. Either way gives the player more access to the form, your choice as to which you'd want to implement.
Unlike Battle Bond Greninja, Pikachu's stats in this form are the same, so it'd be cool if this hat allowed you to change the form of an existing Pikachu by simply placing the cap on Pikachu's head as Ash does in the SM Anime, kind of like the DNA Splicers and Gracidea change the forms of other pokemon. Just click Pikachu with the hat again to revert the change. It'd also be pretty cool if you could wear it yourself, but that might be asking for a bit too much.
If this system were to be added this would give players a lot more control over the form, as it would allow them to choose the hat that they want like the different codes allowed in the original game. This would be lost if every 1/300 Pikachu spawned with a random cap, or something similar. Hunting for the right hat would get boring fast, so I feel it'd be more fun to turn a Pikachu we've already formed a bond with into this form and back again, which is a bit of a departure from the games, but so is fishing for Ash-Greninja, and I feel like this would be a cute and fun way to implement it rather than just making it a spawn.