In that case, my apologies. I got it all wrong since the 2 times I managed to defeat the mech are where I actually made the turrets to point at specific parts, and since Railguns can only target specific parts, I though they both worked the same.
In any case, yeah, the main point is the lack of information presented to the player, if I saw a bigger healthbar going down when turrets are firing, it would be clearer to tell they do actually work that way.