I found a completely different solution at the end. I basically took a look at the script contained in 8k-boot-patcher and reverted each file that was affected by the script (I also overwrote adbd with a clean copy taken from a boot.img for Nokia 8110). I managed to unroot the phone completely. The only problem left is that the checksum of the unrooted boot.img I created does not match the original one, so that I can not update to the new firmware available.
Just in case, I would like to ask whether there is anyone who can share a clean dump boot.img for my phone model. If not, it's ok. At least I managed to unroot the phone even if I do not have the original boot.img file anymore.