Follow this process for renovating sash windows with significant rot, loose joints and twisted wood.
Prepare a sheet of hardboard or plywood to fill the window temporarily; this job will take several days.
Strip all the paint using a chemical stripper. A poultice stripper will work best. This will also soften the putty.
Assess the damage. The window in the pictures below was nearly a century old and yet there was only a litle damage from rot; the rails have tongues passing through slots in the stiles and these were loose.
If you have to dismantle the sashes, remove the putty and glass. If not, consider just replacing the putty.
Remove all the fittings including the catch and sash pulleys. Strip the paint with a chemical stripper.
If only the surface of the wood is damaged, use a two-part epoxy filler.
If damage is more substantial, carefully knock the joints apart. Pull out the wedges. Use sandpaper to remove any loose wood. Apply wood hardener to soft wood which you want to keep.
For more serious damage you need a router or else a carpenter to do the work; the mouldings will need to be matched and the joints at corners cut accurately.
Make a new set of wedges. Apply wood glue and reassemble the sash; drive in the wedges with a mallet. Inject glue into splits. Use clamps, protecting the wood with pieces of wood or thick card. Make sure the window is square and not twisted.
Once the glue has dried, cut off any protruding pegs. Use two-part epoxy filler to fill cracks and gaps and sand smooth when dry.
Apply a primer and undercoat.
Refit the pulleys.
Rebuild the window, including using new ropes.