Currently the ebook converters don’t support Scrivener links to internal references, so there’s not a way in Scrivener to do this. You could try something like compiling to RTF or to DOC using the Microsoft Office converters, which do support the links as RTF bookmarks, and then converting that to epub and cleaning it up in Sigil. I’m not sure if using Word as an intermediary would help more or hinder, but it might be worth experimenting given that you have a lot of links.