The P38 was quite an advanced pistol in 1938 and is a very sound design. I think the Germans made an error going to an aluminum frame as later P1 have a steel cross pin, obviously there to prevent cracks. Also, on my P1, the breech block hits the frame hard enough to create an indentation. You don't see that in steel frame P38's. The external safety while positive, requires the left hand to operate, and rotates in the wrong direction. It is simply too far up and awkward for a right hander to move with his right thumb in a timely fashion.
But, there is something I do like on the P38, and that is the open top. That open top frame allows for a quick wiping of dirt and reduces the chance of a stove pipe. There is no frame enclosure for a cartridge to rebound against.
The P5 is a product improved P38, same locking system, the barrel is supported front and aft which probably reduced machining cost. The P38 barrel is supported by a frame rail cut whereas the P5 barrel does not ride in a groove cut, it sits on top of the frame. However that did make the barrel more complicated, that front lug appears to be integral, so that had to have been expensive to machine.
I prefer the hammer drop safety of the P5 to that of the P38. There are no external safeties , trigger pull is as creepy as any P-38. I had one P38 which had a target grade trigger, but it was happenstance in parts fitting. The P5 trigger may be considered excellent by those familiar with Glocks or standard over the counter pistols. I am however shooting Bullseye pistol with a Les Baer Wadcutter and a S&W M41, and those pistols have target grade triggers. They are just outstanding, no quite Anschutz rifle level, but close. As for the frame shrouding the barrel, while it might be more likely to cause a stock pipe, I am certain it is there to keep dirt out of the mechanism. So, enclosure is a trade off. I still prefer the open top design of the P38, such as I prefer the open top design of the Garand/M14/m1 carbine to a AR15. It can be very difficult to clear a jam or stove pipe in enclosed designs. If you ever shoot an AR15 in competition, you learn to carry a needle nosed pocket tool, so you can reach in with the tool, and pull out jams.
My P5 is reasonably accurate, it is not a target pistol. It is reliable. The rear sight is adjustable for windage, I have no idea how to adjust for elevation. You adjust for windage by knocking the front sight left or right with a P38/P1. That front sight can be very difficult to move and thus the adjustment is irregular and difficult to make. My P1 weighs 1 lb 9.2 ounces and so does the P5, however the P5 feels heavier. Shows how subject humans are at evaluating things . I don't care one way or another about the heel release system. For IPSC shooters who are shooting against time, the heel release system is slow. If the difference between life and death is the speed of your magazine change, you have placed yourself in a situation where you are more likely to end up dead than alive. The heel release system is less likely to eject a magazine when you don't want it ejected, but it is slower and takes the non support hand to press the heel button.
I am of the opinion the reason the P5 failed was due to the fact it is a single stack 9mm. It came out at a time when high capacity 9mm's hit the market, and basically, for the same size and weight, do you want 13 rounds, 15 rounds, 17 rounds, or 9 rounds?