Format content value from DB outside of WordPress filters
There are a few filters and actions here that run. You’d need to look at the code and figure out what/how to utilize these. https://codex.wordpress.org/Function_Reference/wpautop https://codex.wordpress.org/Function_Reference/wptexturize https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content https://developer.wordpress.org/reference/functions/do_shortcode/ https://developer.wordpress.org/reference/functions/unescape_invalid_shortcodes/ https://developer.wordpress.org/reference/functions/get_shortcode_regex/