Try checking out
how it was done for the Forge Cleric. it bootstraps the tool gear itself, then assigns it in an eval script with a linkage table (I don't know how that works, but I'm going to go see if I can search and find out).
Then the only thing you'll need to solve is the expertise thing. I'd pull that out, make sure just the proficiency part is working, then put it back in and work from there.