No this is not possible due to the application control of the title and that most ebook software restricts the usage of JavaScript. I would advise using a script to unpack the ePub and use something like Imagemagick or sips (for mac) to resize the images to around 650px width but that depends on the image overal size.
One issue you will face with InDesign is that if you use the same image, say like a chapter ornament, the application doesn't consider you using it multiple times but generates the same image for every instance it is found. I would advise you to do what you can and then on export unzip and cleanup the images. As far as lazy loading most applications load on chapter increments so make sure to separate the content by chapter levels so it will not effect the user.
One thing I would point out is if you have a ton of text as images I would reconsider that approach as text in an image is considered bad and tends to be rejected by a lot of areas.
For performance if you used paragraph styles you could use InDesign to export to individual HTML files based on the InDesign style on the ePub export. That may increase performance for you but in the end I would still advise unpacking the ePub, as it is technically a zipped file, and cleaning the HTML, CSS and images.