Get original post ID after wp_insert_post
Ultimately the solution that I found was to use global $post; to retrieve the current post’s ID. Immediately after wp_insert_post( $new_cpta ); above, I added global $post; $currentid = $post->ID; Then I was able to update the post meta for the correct post with $currentid in place of $post_id.