I'm not looking to copy someone else's work thats sure,
Unfortunately that is exactly what you are asking to do by 'transferring' their code into a new MCU.
Take the analogy of a hardware design (which I gather you are more familiar with). Your company has asked you to design a circuit and you have spent some days/weeks/months designing, prototyping, testing, PCB layout and final production work and it is ready to sell to customers. How much do you charge? Certainly not just the cost of the final PCB and components. You need to cover all of the development time, management overheads, test equipment etc. that was used in this work. (Even if you are a 'one man band', the principle still applies.)
Your company would not like it if some other company or person took your board, looked at it, and then make exact copies that they could then sell at a much lower cost than you could as they don't have the overheads that you did.
Therefore they do things like use multilayer PCBs so that you can't trace the circuit very easily, scrape off the IDs from ICs so you can't see what the actually are and so on.
Software/firmware is basically the same. Instead of an 'and' gate you have the 'AND' instruction, 'multiplier' chips are replaced by multiplier hardware in the MCU but triggered by the 'MULT' instruction. (I'm talking assembler level here which is roughly the equivalent of hardware as it is what the MCU actually executes).
In the case of firmware companies use the built-in capabilities of the MCU to stop the code being copied from the production devices. They are simply stopping unscrupulous people from copying their hard work and making money from it.
You are not necessarily doing this as you say you are simply repairing the boards and the assumption is that you will not go further than that., However the original manufacturer needs to protect themselves against the unscrupulous people and repairers like you are simply caught in the crossfire (as it were).
If you are lucky and the treadmill manufacturer has not copy protected their code, then making a copy might be possible, but as I've asked several times now: what then? Are you wanting to try to unsolder the old MCU and solder in the new one (ether before or after you transfer the code)? That is a difficult and error prone task and one of the reasons why most places simply do board replacements these days - you are very likely to do more damage to the board in this process.
You say you are doing this for your customer: sometimes it is simply better to either turn down the business (after all, what if you try to repair the boards and can't - you will have spent all the money tooling up for the work only to not be paid, but possibly sued as well) or tell them that the boards are expensive and pass on the cost.
This does go to the heart of the 'right to repair' movement but that is only just taking off and it sounds like your treadmill manufacturer has not got on board to the extent of allowing the repair you are trying to make.
Susan