Thanks for your reply Tor!
For anyone having this same problem, I managed to run NoMachine and automatically connect to a remote computer on Android boot adding a shell script under /data/adb/service.d
The script contains:
sleep 15
am start -a android.intent.action.VIEW -d file:///sdcard/Android/data/com.nomachine.nxplayer/files/NoMachine/connection.nxs -t application/octet-stream
It is necessary to have installed Magisk.
Cheers!