I have used it also in similar cases though I highly recommend THWN-2 for the temperature rating, and once I am in the engine compartment I change completely. There I worry about oil resistant and a much better heat resistance based on where the wire may sit.

The black plastic loom protects the THWN from road oils but not in the engine compartment unless I am far from any possibility of spray and heat can be much different.

Shane