How to extract some part of WordPress full source code

Let’s say what you have for post_content in database is $raw_content. Then what end result displayed by theme (simplified and varies a bit) would roughly be apply_filters( 'the_content', $raw_content ).

Which filters? Essentially who knows. Quite a few are added by core to handle things like markup and typography adjustments, shortcode processing, and so on. But they can (and do) get added by plugins as well.

Post saving has similar aspects.

It it essentially impractical to try rebuild this process. Either you are happy with raw data or you have to perform WP core load and get the raw stuff through the motions.

Latter might be sped up with technique like SHORTINIT load, but it’s involved to develop and impossible to distribute in public code.