Hi Will,
When you insert posts, please don't use add_post_meta
to add custom fields. Instead, use $wpdb
to insert data to the custom table, like this:
global $wpdb;
$post_id = wp_insert_post( $post_data );
$custom_fields = [
'ID' => $post_id,
'field_1' => $value_1,
'field_2' => $value_2,
];
$wpdb->insert( 'custom_table', $custom_fields );