Your description of the dramatic voltage drop (from 5V to 0.5V) upon the connection between the flight controller (FC) and 4-in-1 ESC makes me think that the issue you're seeing is most likely due to a short or low resistance path to ground. There are other possible failure modes that could cause this, but a ground fault sounds most probable here.
When a ground fault is created in one of the components attached to the 5V power rail generated by the ESC's BEC (Battery Eliminator Circuit), a substantial current greater than the BEC's rating for continuous power delivery flows. This is due to Ohm's law,
I = V/R which states that a large current (I) will flow if the circuit resistance (R) is tiny.
The usual mode of operation for power supplies when they experience surges in power demand is to drop their output voltage in an attempt to prevent catastrophic failures of themselves or downstream components by decreasing the power output. (Power
P = VI) This is a near-ubiquitous safety feature.
Confirming a Diagnosis of a Ground Fault
Since ground faults manifest themselves as low-resistance paths between the power rails, the way to test for the existence of one is to (use a multimeter) measure the resistance between the
GND lines on the FC and the 4-in-1 ESC independently.
It would be best if you could fully disconnect all peripherals from the FC before measuring for a ground fault, as it is possible that the issue is with one of them and not the FC, but this can also be done once a problem with the ESC is eliminated to possibly avoid desoldering and resoldering the components back together.
NOTE: remember to take resistance measurements with no power attached to the device being measured!
If the measured resistance for the FC isn't high (the exact threshold differs between circuits, but the difference between a ground fault and a safe circuit is significant and should be noticeable), then there is a ground fault somewhere inside the FC. Likewise, if the measured resistance for the ESC isn't high, then there is a ground fault somewhere inside the FC. If both components have low resistance paths between the power rails, then they both have ground faults.
You could either attempt to correct the ground fault in the affected component(s) or replace them. Sometimes the cause of the ground fault is some SMD (Surface Mount Device) component that is too small for you to comfortably work on or broken solder mask in the PCB, in which case fixing it may be more trouble than it's worth.
However, the only cost of trying to fix and not buy new is your time. And hey, you never know when a troubleshooting venture like this will teach you something new about electronics!