Do not know enough about this oven to be completely helpful but the thermostat should not be connected directly to the neutral that is probably why it is melting. The thermostat should be wired so that power comes in one side then out the other side to a load, maybe a switch to an element or something similar. It's purpose in life is to cut the power off to the load if something goes wrong & the oven overheats.. Find a wiring diagram & follow it or get someone in to do it for you. Remember electricity can kill.
Lincoln Appliance NZ, April 2010