If your data is immutable I would recommend you switch to using time-based indices, e.g. data streams. With this approach all new data is written to the newest backing index and when they reach a certain size a new backing index is created behind the scenes and writing of new data switches to this. This means that only a small portion of indices are actively written to, which means they can be optimised, e.g. through forcemerge. This approach also allows you to manage retention by deleting complete indices, which is a lot more efficient that deleting data through delete-by-query. You can do this through index lifecycle management.
You can then back up old indices through the snapshot API and use the restore API to load them at a later date if needed.