On the front driver's side, you have to remove a little triangular brace. I think it has two 10 mm bolts, one of which is a little awkward to get at. Once that is removed, you can unclip the harness and move it a little so you have better access to it. Then you can study it to see how the two halves come apart. They do come apart, but you have to study it to see the tabs.
The passenger side front is easier. There is no metal bracket to remove, at least on my 6MT car. Unclip the wiring and then undo the harness connector.
I agree about not twisting them loose with the harnesses connected. The edge of the top of the 02 can cut the wires. Also, twisting wires that tightly is not good for them when they are in a harness like that. It can be done, however, once or twice, and you will probably get away with it if you are careful.
As for the sensors being frozen in the pipes, I would not use heat since you could damage the sensor. I would spray with penetrating lubricant like PB Blaster or Kroil or Thrust. Use an 02 socket (has a slit for the wire) if you find one that fits. I usually use a 22 mm wrench. You have to use the open end, obviously, because the harness connector won't fit through. Once you have figured out the lefty loosey righty tighty bit and know what direction to turn, you can hold the wrench end on the socket while you whack the other end with a small sledge hammer. Often a quick shock is more productive than massive muscling when it comes to freeing a frozen bolt (though with old rusted frozen ones you can break the nut or bolt top right off doing this and MAPP gas or Acetylene is best if penetrating oil alone does not work).