Errors with "LOAD DATA LOCAL INFILE"
Maybe, is this the appropriate Drupal way or is there a more elegant built in solution I am unaware of?


Yes, that's an appropriate "Drupal" way.

The other way is to make it global, and add it to the database settings array in settings.php.

But you're essentially setting the same thing whichever way you do it. If you were to use your method, and then remove that option from the connection afterwards, it could arguably be considered more secure, since you're limiting the time and scope that LOCAL INFILE can be used in.