I edited both the EPUB and AZW3 and saw the lang tag you entered -- it was nowhere else.
I converted the EPUB to AZW3, and it worked fine. In
all articles, my Kindle (Touch) got the order right.
Converting to MOBI resulted in all Hebrew showing up backward. The lang setting was stripped from the one place it had been. (And yet the calibre viewer still displayed even this properly, it embeds webkit.)
I suspect the .pobi format which is used for periodicals would have the same flaw, (it is based on MOBI not KF8) however I cannot test it as there is no POBI output converter, except the one built into the Get news.
Moral of the story -- it seems the Kindles only properly supports RTL languages when using AZW3. I will keep this in mind when I finally decide to make that siddur-for-Kindle I was planning -- a few years ago -- to make.

I have not ventured into this sticky end of the pool before.