You can get small project enclosures to put them in. Some PVC pipe and end caps could also work.
I would probably just use some good quality, adhesive heat shrink if they are out of the way though.
Ask Electronics
For questions about component-level electronic circuits, tools and equipment.
Rules
1: Be nice.
2: Be on-topic (eg: Electronic, not electrical).
3: No commercial stuff, buying, selling or valuations.
4: Be safe.
Adding on to this line of thinking, maybe a thin plastic tube and epoxy to encase it with the solder joints. (Bonus points for using thermal epoxy, since it is a resistor after all.)
I have seen Bigclive on YouTube encase resistors and a diode rectifier in standard epoxy for use in lighting, so heat probably won't be an issue now that I think of it.
This is intriguing and I'm going to think about this.
I tried finding the video, but I cannot.
It's the same concept as potting PCBs with black epoxy. Of course, it helps to be aware of heat sensitive components but China never cares about that.
Google for Epoxyseal 9000, if you want something proper.
I would make sure the solder connection between wire and resistor is very solid, and then encase the stuff in heat shrink tubing with glue in it. (Adhesive Lined Heat Shrink Tubing)
If it's good enough for Nasa, it will work for your car: https://makezine.com/article/technology/computers-mobile/how-to-splice-wire-to-nasa-standards/
Look for a higher quality resistor? There will definitely be something in your range that is made for durability.
You can get panel mount resistors. They are usually rated at way higher wattage though.
I would probably just heat shrink the resistor. Your harness should be reasonably secure anyway.
I would question why you need a 2.2ohm 1/2w resistor in a harness in the first place though.
To fool the computer into not throwing an airbag light and disabling all the airbags. I have an early 00s car that swings double duty as street car and track car and when I pull the driver's seat out for a race seat, the airbag light shows up. Then I go through a rigamarole to reset the light once everything is swapped and plugged in again. It's a common mod, but just people usually cut up the harness. I'd like to keep things neat and tidy so I bought the seat side of the harness and want to cut the plug off, solder on the resistor and plug it in.