Is there a way to convert (preferably in batch) .doc files with images to .epub without the loss of the images and formatting?
Calibre is very useful piece of software for ebook-handling purposes, it has many options for converting between formats and generally does a good job keeping the original formatting and images intact. Also works for batch conversion.
I have not found a way to do this without losing formatting or the formatting getting all munged.
No, you don't want to do it this way because, as you mentioned, formatting is not retained. Even when you follow DOC setup closely, like with Smashwords, you will still have problems. Starting an EBOOK in .DOC format is the worst, most time-consuming way to go. I've done it. What's more, using the DOC to EPUB method, the formatting will look different on different devices. It's an all around headache that's not worth the hassle.
So I wrote a Perl program where you write your book in MultiMarkdown and it creates an EPUB for you. It's MUCH easier that way. But you do have to install Perl to use it. (It's free.)