Let me know if you can follow your own instructions.
Anyway, I used Botania's 1.14 branch as a guide in order to create a potion effect. Unsure about how to throw it into a potion item though, but I'll figure it out when I can be bothered.
I'm gonna want to try creating my own trident later, so hopefully an answer to this can be found.
Will let you know if I run into the same issue you're having.