Selecting all posts from the children of a particular parent taxonomy

I think you’re way overcomplicating this. Use get_terms to get all taxonomy terms that are a child of a particular term via the child_of argument, then use that array with a WP_Query tax query, no custom SQL queries necessary.