You can group Tailwind classes into parent classes using @apply and everything works as you'd expect
If all your classes are in an apply, why not just use the CSS? most of the utility classes are one line classes
And even better, if you work at a place where a custom design system is needed, Tailwind has pretty much everything you need to customize your own but still give the same Tailwind productivity to developers.
Do these theme.js files have full sizings, spacings, etc defined?