The wires for the exhaust gas temp sensor have special heat resistant properties as that area can get to around 700 degrees C during a DPF regen, The sensor should be replaced rather than joining it as any crimps or solder could melt. If plastic crimps could cause a fire.
The O2 sensors need an oxygen sample reference as the housing is laser sealed, it gets this down the special wires so be mindful of running errors in the future if you splice or solder them.
Any body side wires can be joined, but I would replace any damaged sensor wires with a new sensor then coat them in very high temperature sleeves coated in the hottest chilli or tobacco sauce you can find, will smell nice during a regen too