This sounds like a computer or sensor driven problem to me. Modern cars have engine management and powertrain management computers, when you disconnect the negative battery terminal you cut off power to the ECU (Engine Control Unit) and PCU (Powertrain Control Unit) and they reset.
The question is why a reset is fixing the problem:
- A computer is faulty: resetting causes it to work again. Solution is to get the faulty computer repaired or replaced
- A computer has detected a fault which means the car should not start: If there's a serious problem somewhere the computers may be doing just what they should - stop you from driving. Resetting the computers clears the error, which gets re-detected next time the car is run. This could be a real problem or a sensor malfunction. If this is the case I'd expect to see the check engine light come on and stay on
There's a good chance that your car may know what's wrong with it and can tell you. Modern cars have OBD (On-Board Diagnostics) ports that you can connect to and read error codes. If there's an ECU malfunction, error condition or a sensor problem it will tell you. Many auto parts stores will read them for free, you can also buy readers cheaply these days if you want to read them yourself: bluetooth ones can be had for $20 and interface with free phone apps. You would want to first clear your codes (be sure to read and note them down before you do for future reference) and then read the codes after the problem happens, don't disconnect the negative battery terminal until you do!
The OBD ports on mercs are usually under the drivers side dash, close to the steering column.