You may want to look into factorizing your enum declarations using plugins. Here is very similar example in our plugins repo:
You can take inspiration from there to limit boilerplate in your customization code. I hope this helps