Recover data on internal memory of a dead HTC One M8 I happen to drop my HTC One M8 due to which the screen got cracked and also made the phone stop working, doesn't start, doesn't charge, absolutely nothing, as good as paperweight.
I took the phone for repairing and they told me that, the phone needs following:-


Chipset rework to main board
Charging connector replacement
New LCD
Software flash - all personal data will be lost/erased


What I am more concerned about is the loss of data from the internal memory. 
I would like to know if there is anyway that I can recover the data, I have some important files, text and WhatsApp messages(which were not backed-up before the drop)

One thing I came across is tools for recovering deleted files. 
Is it possible that I get the phone repaired including software flash and then run one of these tools viz. H Data Recovery to recover my data?
I mean even with a software flash the data will still be in the memory and just the pointers will be removed, right? like it happens in simple disk format. I am assuming this, please correct my understanding.

If the above is possible, what should I ask the repair center to not do, so that there is still the possibility of data recovery?
Double-trouble. If the device cannot even be powered up, you can't access its internal storage to rescue your data. As soon as the software is flashed and the device reset, that data is gone – and without root powers, rescuing data from internal storage is close to impossible (so at least your WhatsApp data would be gone for good). There are very few tools which might help you on a non-rooted device (e.g. DiskDigger), but I wouldn't count on that.