because you have deleted the JOIN node. Now only individual values arrive in the Heat_COP function one at a time (not together in the same message).
Here is proof it can work...
[{"id":"a86237e4da497c79","type":"inject","z":"553814a2.1248ec","name":"fake MQTT - eat_Energy_Production \"123\"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"jeisha/main/Heat_Energy_Production","payload":"123","payloadType":"str","x":1700,"y":640,"wires":[["4f2c76dd.27c688"]]},{"id":"4f2c76dd.27c688","type":"switch","z":"553814a2.1248ec","name":"Heat_Energy_Production","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"jeisha/main/Heat_Energy_Production","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":2010,"y":640,"wires":[["271d52fe.9431de"]]},{"id":"271d52fe.9431de","type":"function","z":"553814a2.1248ec","name":"HP","func":"msg.payload = Number(msg.payload);\nmsg.topic = \"HP\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2230,"y":640,"wires":[["b75e6986.331248","18087c189f7be93b"]]},{"id":"b75e6986.331248","type":"debug","z":"553814a2.1248ec","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":2390,"y":580,"wires":[]},{"id":"18087c189f7be93b","type":"join","z":"553814a2.1248ec","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":2390,"y":660,"wires":[["cdc8af37.342c6"]]},{"id":"2358c94b.8214b6","type":"function","z":"553814a2.1248ec","name":"HC","func":"msg.payload = Number(msg.payload);\nmsg.topic = \"HC\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2230,"y":680,"wires":[["18087c189f7be93b","f9509429a14d6fb8"]]},{"id":"cdc8af37.342c6","type":"function","z":"553814a2.1248ec","name":"Heat_COP","func":"var HP = msg.payload.HP;\nvar HC = msg.payload.HC;\nvar COP = 0;\nif(HC !=0) { COP = (HP / HC); } \nmsg.payload = COP;\nmsg.topic = \"Heat_COP\";\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2550,"y":660,"wires":[["baaa9fa1.f7d5e"]]},{"id":"32bb0252.2f1c1e","type":"switch","z":"553814a2.1248ec","name":"Heat_Energy_Consumption","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"jeisha/main/Heat_Energy_Consumption","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":2020,"y":680,"wires":[["2358c94b.8214b6"]]},{"id":"f9509429a14d6fb8","type":"debug","z":"553814a2.1248ec","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":2390,"y":720,"wires":[]},{"id":"baaa9fa1.f7d5e","type":"debug","z":"553814a2.1248ec","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":2670,"y":600,"wires":[]},{"id":"791e49c2b8009bf7","type":"inject","z":"553814a2.1248ec","name":"fake MQTT - Heat_Energy_Consumption \"456\"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"jeisha/main/Heat_Energy_Consumption","payload":"456","payloadType":"str","x":1700,"y":680,"wires":[["32bb0252.2f1c1e"]]}]
and here is a slightly condensed version...
[{"id":"271d52fe.9431de","type":"function","z":"553814a2.1248ec","name":"HP","func":"const expectedTopic = \"jeisha/main/Heat_Energy_Production\"\n\nif (msg.topic === expectedTopic) {\n msg.payload = Number(msg.payload);\n node.status(msg.payload);\n msg.topic = \"HP\";\n return msg;\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1970,"y":620,"wires":[["18087c189f7be93b"]]},{"id":"2358c94b.8214b6","type":"function","z":"553814a2.1248ec","name":"HC","func":"const expectedTopic = \"jeisha/main/Heat_Energy_Consumption\"\nconst newTopic = \"HC\"\n\nif (msg.topic === expectedTopic) {\n msg.payload = Number(msg.payload);\n node.status(msg.payload);\n msg.topic = newTopic;\n return msg;\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1970,"y":680,"wires":[["18087c189f7be93b"]]},{"id":"cdc8af37.342c6","type":"function","z":"553814a2.1248ec","name":"Heat_COP","func":"var HP = msg.payload.HP;\nvar HC = msg.payload.HC;\nvar COP = 0;\nif(HC !=0) { COP = (HP / HC); } \nmsg.payload = COP;\nnode.status(msg.payload);\nmsg.topic = \"Heat_COP\";\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2270,"y":620,"wires":[["baaa9fa1.f7d5e"]]},{"id":"baaa9fa1.f7d5e","type":"debug","z":"553814a2.1248ec","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":2430,"y":620,"wires":[]},{"id":"a86237e4da497c79","type":"inject","z":"553814a2.1248ec","name":"fake MQTT - eat_Energy_Production \"123\"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"jeisha/main/Heat_Energy_Production","payload":"123","payloadType":"str","x":1700,"y":620,"wires":[["271d52fe.9431de"]]},{"id":"791e49c2b8009bf7","type":"inject","z":"553814a2.1248ec","name":"fake MQTT - Heat_Energy_Consumption \"456\"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"jeisha/main/Heat_Energy_Consumption","payload":"456","payloadType":"str","x":1720,"y":680,"wires":[["2358c94b.8214b6"]]},{"id":"18087c189f7be93b","type":"join","z":"553814a2.1248ec","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":2130,"y":620,"wires":[["cdc8af37.342c6"]]}]