Shoot in RAW and tip for processing RAW and getting more info from your image.
Check about
enfuse (open source). From RAW you can extract upto +3EV and -3EV (using for example ufraw) ~ google will help you find scripts to automate this. Then use enfuse to extract as much as info as possible from the shadows and highlights into one jpg or tiff. Then finish off in your favourite editing software (levels, sharpness...).
Another tip is that enfuse tends to make the highlights grey. Add the 0EV image as a layer in your editor and select 'lighten only' blending mode, you'll get all the details from the shadows and bright, natural highlights.
For example this photo show details (on the right) which in the camera jpg were black (I shoot RAW+). The end result is a natural, not psychedelic, compostition.
https://www.flickr.com/photos/difermo/8736408542/