Me and @angus discussed this and found a very simple solution to this problem. It seems to be working fine.
Writing the on() code outside after_initialize solves the issue. I think that’s how all the plugins should do that. I think the issue was on our part.
The reason this works is, the control enters plugin.rb before the rails initializers are run and hence the on() callbacks get registered before the webhooks are enqueued.