Convert attribute woocommerce terms (taxonomy terms) in posts of custom post type

It’s definitely possible, I believe you are on the right track.

You might wanna add a check if a post already exists with this title, because you’re likely to run into some PHP timeout issues with your script. That way you can run the script several times and create all the posts.

You can use the post_exists() function for this:

if( post_exists( $term->name ) ){
   continue;
} else {
   wp_insert_post($args);
}