How does civi replace page content? Wordpress
The CiviCRM plugin only filters the content when the shortcode is present or when the page is the CiviCRM basepage. For shortcodes, it pre-renders the CiviCRM content that the shortcode represents at the wp action stage (in order to support multiple shortcodes in, for example, archive pages) and then uses the the_content filter to inject the CiviCRM content. 

All the relevant code can be found in https://github.com/civicrm/civicrm-wordpress/blob/master/includes/civicrm.shortcodes.php

If you have details of situations where the plugin incorrectly filters content, it would be helpful if you could update your question with specific information so that it can be addressed.