Well… ok… so… there are a couple of things you can do to optimise, but please do not get your hopes up. First, the batch.js output is a relic from an ancient past where the static resources were optimised differently than they are today. You can thank Microsoft / Internet Explorer for that.
The web resource manager, or page assembly manager, first determines which static assets need to be loaded based on the web resource context. Afterwards it will look at (shared) dependencies and create batches and super batches. You cannot change this process, and Jira/Confluence will continue to create these batches for the bulk of the static assets (either native assets, or other apps installed).
For your own app, you can do something. For instance, you can make use of the excellent atlassian-webresource-webpack-plugin.
If you combine this with webpack optimisation, and more specifically lazy loading (using the
import() method provided by webpack), you can actually make sure that your app static code is not going to further increase the batch.js as it will only contain the webpack runtime and a very minimal boot loader for your app. But that does require that you organise your code in a way that it is bundled correctly by webpack and that you use lazy loading strategically.