Give each figure an ID based on its (first) image
Shorten the page span class to just "page"
Style the end of the foreword and preface with CSS, not &nbsp;
Resize images using ImageMagick
Add an element whitelist check after sanitizing
Fix broken note URLs
Abandon the multi-page idea, adapt santize to work on individual pages
Add serialize() to serialize individual pages
Remove the part and chapter IDs
Apply serialize() and check in the result

The following was pasted into each page, opened with Opera 12.14:

<script src=sanitize.js></script>
<script>window.addEventListener('load', function() {
    sanitize(document);
    alert(serialize(document));
});</script>
Split the parts into separate files

This will make the chapters start on a new page even when
CSS is ignored.
Revert to a multi-page EPUB structure