A combination of
Editor Chains and
Action Chains lets you perform lossy compression on multiple books.
In Editor Chains, there is a an action called "Compress Images", that enables you to automate this process. You can use the Action Chains to run this for multiple books. (chain in first attachment).
If you want to use an external tool to for lossy compression, e.g. ImageMagick, which can help convert png to jpg, you can use the Run Command action which will iterate over all images in an epub. See
this post and screenshots for more details. (chain in second attachment). Note however, that you might need to edit the chain to configure the path to ImageMagick on your system.
To import the attached chains: Action Chains > Add/Modify chains > right click the chains table > import > browse to the zip file.
Note: I have found the ImageMagick approach to be much faster with lossy compression compared to the first approach that uses the editor's "Compress Images". Test with both and see which is more satisfactory.