Reversible data hiding in encrypted images (RDHEI), which can simultaneously protect the cover image and private data, has been widely studied in recent years. To address the issues of limited embedding capacity due to underutilization of high bit-planes redundancy and inaccurate prediction of complex image regions, a novel RDHEI method based on combined prediction optimization, hierarchical block compression, and context-based adaptive binary arithmetic coding (CABAC) was proposed. Firstly, by integrating the combined predictor and prediction error modification (PEM) strategy, the accuracy of prediction in complex regions and compression efficiency were effectively improved. Secondly, a quadtree-based adaptive hierarchical block compression strategy was designed to replace fixed partitioning, allowing for more flexible redundancy minimization. Finally, CABAC was applied to further reduce auxiliary information. This approach effectively increases embedding capacity and ensures lossless image recovery. Experimental results show that the proposed method outperforms existing mainstream methods in terms of embedding rate. On the three public datasets BOSSbase, BOWS-2 and UCID, the average embedding rates of the proposed method are 4.324 5 bit/pixel, 4.232 7 bit/pixel and 3.575 2 bit/pixel, respectively, which correspond to improvements of 3.63%, 3.59% and 2.38% over existing mainstream methods.