I have an iPhone that is completely dead. Tried to fix it but there was a problem with the internal circuits if I remember well. I thought about selling the iPhone to people that want parts of it (e.g. screen) but I was doubting if they could somehow reach private information that was in the iPhone.
The reality is that anyone who repairs the phone, and in this case it sounds like it has a logic board issue, will have full access to the phone if it wasn't protected by a passcode. A lot of micro-soldering repairs can be surprisingly straightforward.
In practice however, an iPhone 5 doesn't have much value as a phone so it will most likely serve as a donor device for repairing other phones. If the data on the phone is THAT sensitive to you, then you should consider selling it minus the logic board or see if it can be repaired so that it can be properly wiped clean.