Hi, Branwen. Yes, you do have to remove the mouldings on both sides before replacing the door frame. Gently pry them off so they can be reused and then pull any nails out the back of the moulding so you don't deface the front and it helps if you mark where each piece came off. Then cut or pull the nails that hold the frame to the studs.
When you put the new frame in, use shims and a 4' level to get the hinge side plumb and straight. You can buy the narrow shims at a home center and put one in from each side. Since they have a long slope, move them against each other to make the pair thicker, but don't take all the room from one side. Keep the frame centered in the opening. Use about 16 penny finishing nails to go through the frame and shims and into the studs. Then use a framing square or torpedo level to get the top of the frame square and level to the hinge side. Then do the handle side of the frame the same way you did the hinge side. I like to replace one screw in each hinge with a 3" screw through the frame and shims and into a stud for added strength. Then replace the mouldings.
I'm not sure if you are doing interior or exterior doors, but you don't have to insulate inside doors.
Also, there are some ways to play with the angles of the moulding to make your eye think that a door opening that is a parallelogram is square but that is awfully hard to describe.