Lossless? That's going to be tough on you. Actually even with lossy I can't think of anything. Just uncompressed. Most codecs tend to stop at the 10bpc or 12bpc mark when it comes to support, and h.264 itself goes no further than 14bpc anyway as a standard. Even industry codecs don't really go further than 10 and 12 bpc generally speaking, so realistically your best bet is exporting 16bit uncompressed, though I'm not sure how alpha handling would go, as sadly the only yuv format with alpha support which I'm aware of is ProRes 4444
(which is lossy and up to 12bit). So you'd be forced to go the rgba route (which I take you won't mind tho, considering if not for the fact that you have to deal with a shitload of images, you'd be fine with png). At that point you can just load those files in wherever you need to.
For your final export I suggest avoiding alpha, though, since it is extra filesize you won't need for the final encode. You should then be able to load it into avisynth with an appropriate source filter
which will give a stacked 16bit to be used with dithertools, so you can output a dithered 10bit to x264.