UI Template Edit msg.payload then Output

You are reinventing the wheel.

Ui-table will allow you to edit the cells of the table , once edited click row to send update
here is an example

[{"id":"54197d9fec778b15","type":"inject","z":"36348c32365b6b66","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"id\":0,\"machine\":\"aa-bb-11\",\"targetTime\":12,\"quantity\":3,\"reset\":false},{\"id\":1,\"machine\":\"aa-bb-12\",\"targetTime\":12,\"quantity\":3,\"reset\":false}]","payloadType":"json","x":970,"y":240,"wires":[["e60166842e8e4533"]]},{"id":"e60166842e8e4533","type":"function","z":"36348c32365b6b66","name":"Format for Table","func":"let table = flow.get(\"table\") ||  [];\nif(table.length < 1){\n    let ui_control = {\n        \"tabulator\": {\n            pagination:\"local\",\n            paginationSize:8,\n            paginationButtonCount:5,\n            selectable:1,\n            locale:true,\n            layout:\"fitColumns\",\n            columns:[\n                {\n                    title:\"Machine\", \n                    field:\"machine\",\n                    formatter: \"plaintext\", \n                    editor:\"input\",\n                    mask:\"AA-AA-99\",\n                    maskAutoFill:true, \n                    editorParams:{\n                        elementAttributes:{\n                            maxlength:\"8\", //set the maximum character length of the textarea element to 10 characters\n                        }\n                    }\n                },\n                {\n                    title:\"Target Time\", \n                    field:\"targetTime\",\n                    formatter: \"plaintext\", \n                    editor:\"input\", \n                    editorParams:{\n                        elementAttributes:{\n                            maxlength:\"10\", //set the maximum character length of the textarea element to 10 characters\n                        },\n                    mask:\"9999999999\"\n                    }\n                },\n                {\n                    title:\"Qyantity\", \n                    field:\"quantity\",\n                    formatter: \"plaintext\",\n                    editor:\"input\", \n                    editorParams:{\n                        elementAttributes:{\n                            maxlength:\"4\", //set the maximum character length of the textarea element to 10 characters\n                        },\n                    mask:\"9999\"\n                    }\n                },\n                {\n                    title:\"reset\", \n                    field:\"reset\", \n                    formatter:\"tickCross\",\n                    editor:\"tickCross\"\n                }\n            ]                  \n        }\n    }\nnode.send({ui_control}) \n}\nflow.set(\"table\",msg.payload)\nmsg.payload = {\n    command:\"replaceData\",\n    arguments:[msg.payload]\n}\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1180,"y":240,"wires":[["828a8f6f187a9559"]]},{"id":"828a8f6f187a9559","type":"ui_table","z":"36348c32365b6b66","group":"6305d8128da6cbab","name":"","order":1,"width":"17","height":"6","columns":[],"outputs":1,"cts":true,"x":1350,"y":240,"wires":[["461a02ef6c2ad5de"]]},{"id":"461a02ef6c2ad5de","type":"change","z":"36348c32365b6b66","name":"","rules":[{"t":"set","p":"table[msg.row]","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1550,"y":240,"wires":[[]]},{"id":"fbaf2bcb6253dc30","type":"ui_button","z":"36348c32365b6b66","name":"","group":"6305d8128da6cbab","order":2,"width":0,"height":0,"passthru":false,"label":"gettable data","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"getdata","topicType":"str","x":990,"y":300,"wires":[["b94e9f024fe1b1b2"]]},{"id":"b94e9f024fe1b1b2","type":"change","z":"36348c32365b6b66","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"table","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":1180,"y":300,"wires":[["402f38eb0fa3350b"]]},{"id":"402f38eb0fa3350b","type":"debug","z":"36348c32365b6b66","name":"debug 2475","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1370,"y":300,"wires":[]},{"id":"6305d8128da6cbab","type":"ui_group","name":"Group 1","tab":"b927390ff1bafb51","order":1,"disp":true,"width":17},{"id":"b927390ff1bafb51","type":"ui_tab","name":"bridge","icon":"dashboard","order":20,"disabled":false,"hidden":false}]

Base on Tabulator 4.7, but you could get more functionality by using tabulate 5+ direct in the template Or try dashboard 2 tables.

Oh two clicks, that must be a deal breaker, Have you tried adding a html check box.

To do it in ui-template node you would have to add text inputs to each td, then use ng-model, ng-blur and ng-value to send the row and property and changed data, and update the stored data.
e.g.

[{"id":"17f84e1550b7a06c","type":"ui_button","z":"36348c32365b6b66","name":"","group":"6305d8128da6cbab","order":2,"width":0,"height":0,"passthru":false,"label":"set data","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":1180,"y":180,"wires":[["5c135f0b481561db"]]},{"id":"fbaf2bcb6253dc30","type":"ui_button","z":"36348c32365b6b66","name":"","group":"6305d8128da6cbab","order":2,"width":0,"height":0,"passthru":false,"label":"gettable data","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"getdata","topicType":"str","x":990,"y":300,"wires":[["b94e9f024fe1b1b2"]]},{"id":"b94e9f024fe1b1b2","type":"change","z":"36348c32365b6b66","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"table","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":1340,"y":300,"wires":[["402f38eb0fa3350b","797f37eb7bafc6f0"]]},{"id":"402f38eb0fa3350b","type":"debug","z":"36348c32365b6b66","name":"debug 2475","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1670,"y":300,"wires":[]},{"id":"797f37eb7bafc6f0","type":"json","z":"36348c32365b6b66","name":"","property":"payload","action":"","pretty":true,"x":1330,"y":360,"wires":[["cd459f1561f51e88"]]},{"id":"cd459f1561f51e88","type":"ui_text","z":"36348c32365b6b66","group":"6305d8128da6cbab","order":3,"width":"17","height":"4","name":"","label":"","format":"<pre>{{msg.payload}}</pre>","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1470,"y":360,"wires":[]},{"id":"461a02ef6c2ad5de","type":"change","z":"36348c32365b6b66","name":"","rules":[{"t":"set","p":"table[msg.id][msg.prop]","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1730,"y":240,"wires":[[]]},{"id":"bb259756667c55d0","type":"ui_template","z":"36348c32365b6b66","group":"6305d8128da6cbab","name":"","order":2,"width":0,"height":0,"format":"<table>\n    <tr ng-repeat=\"row in msg.payload\">\n        <td><input \n            ng-model=\"machineRow\"\n            ng-value=\"row.machine\"\n            ng-blur=\"send({payload:(machineRow||row.machine),id:row.id,prop:'machine'})\" \n            type=\"text\"              \n            required minlength=\"8\" \n            maxlength=\"8\" \n            size=\"10\"\n        /></td>\n    </tr>\n</table>","storeOutMessages":false,"fwdInMessages":false,"resendOnRefresh":true,"templateScope":"local","className":"","x":1460,"y":240,"wires":[["461a02ef6c2ad5de"]]},{"id":"5c135f0b481561db","type":"change","z":"36348c32365b6b66","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[{\"id\":0,\"machine\":\"aa-bb-11\",\"targetTime\":12,\"quantity\":3,\"reset\":false},{\"id\":1,\"machine\":\"aa-bb-12\",\"targetTime\":12,\"quantity\":3,\"reset\":false}]","tot":"json"},{"t":"set","p":"table","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1280,"y":240,"wires":[["bb259756667c55d0"]]},{"id":"6305d8128da6cbab","type":"ui_group","name":"Group 1","tab":"b927390ff1bafb51","order":1,"disp":true,"width":17},{"id":"b927390ff1bafb51","type":"ui_tab","name":"bridge","icon":"dashboard","order":20,"disabled":false,"hidden":false}]