The downside of your inheritance approach is that both private/protected methods can only be used in one unit. Depending on how our X object is used, this can mean that the entire module A must be defined in one unit. I really prefer to split large modules in multiple units, each having 1-5 classes. I not too keen on this "unit scope" thing that pascal has.

Personally, I think other languages do a better job at this. C++ has "friend classes" (though they can be messy). Java has packages. These give you a lot more accessibility control for your classes.