If you set the camera to record DNG (in the CHDK raw menu, AFAIK there's no script command for this), it will record DNG instead of RAW. No need for 4.
5) can be done from lua with os.remove(), but the jpeg is so much smaller than the DNG, you could also just leave it in the card. Jpeg size/quality settings will not affect DNG, so you could set it to 640x480 low if you wanted the extra space.