You can start by reading through this thread:
https://www.mobileread.com/forums/showthread.php?t=43230
And don't neglect the wiki How-To that you will find (t)here.
And then, of course, this whole branch of MR is all about epub. It really isn't too hard. I've done one book scan, and have two more teed up, just waiting for a few spare hours.