It sounds like exactly the same symptoms as aperture solenoid failure in a digital body -- extreme underexposure when controlling the aperture from the body with the lens set to A, but correct exposure when using the aperture ring to set the f-stop.
Does the MZ-S use an aperture solenoid to control the diaphragm from the body? The parts list is inconclusive. It lists the aperture control block as a single component, see item 0-G100 on fig.2 of this link:
https://learncamerarepair.com/downloads/pdf/Pentax-MZS-Parts.pdf
So it looks like that entire component would need to be replaced, if the part is even still obtainable, which is likely to cost as much as the camera itself. I think your best option is to only use the camera with lenses that have an aperture ring, and only use exposure modes that don't need to control the diaphragm from the body. At least with the MZ-S you've got an uncrippled mount, which should make life a lot easier.
Edit: Are the correctly exposed frames on your first roll the ones that you shot with the K50/1.4? If that's the case then it would confirm that you've got an aperture block problem, because with the K series lens you definitely would have been using the aperture ring.