If the Leicas were base on the XE (R3, R4? not sure), why were the Leicas so unreliable? Were the XEs reliable?
I am not sure why you think the R3 and R4 Leica were unreliable? I have been in and around photography for over 50 years and I have never hear that claim from anyone. The ones I owned were certainly not. The XE1 was taken by Leica and the body-shell strengthened. Then they added a spot meter, but kept the same shutter. Similar changes were done to the XD series to create the body shell for the Leica R4, but the exact changes have never been clarified. However but if you compare them side by side, the profiles of both the XE1/R3 and XD7/R4 are almost identical. The R3 was also Leica's first foray into auto exposure systems as the previous Leica reflexes before were all manual.
I doubt if the XE1 cameras were unreliable or they would not have be used by Leica for the basis for their models, so yes they were reliable.
Apart from the 2 previous XE1's I have owned, I have also had a couple of R3's and there was no operating difference between them that the general public would notice. (apart from the spotmeter) The only reason I sold the R3's, was the cost of extra lenses required a King's ransom to be able afford them. The R4 I owned, came with a 35/70 constant aperture short zoom lens which in itself an optical design originating from Minolta. The principal difference being the barrel was barrel 'beefed' up, but the optics were identical. Likewise the Leica 70/210/F4 zoom was a copy of the Minolta version. Likewise the R4 was sold because of the cost of extra lenses.
There was also a liaison between Minolta/Leica in the electronics used to operate the TTL flash as used in the Minolta X700. I believe (but cannot confirm) the Leica TTL flash will also work with Minolta TTL flash guns.