After a reboot with a rescue disk I used fsck to check the EXT4 filesystem: there were hundreds of errors.
Then, I reinstalled every installed packaged to fix any corrupt binary file.
After this, the apt error is gone. It was due to a corrupted file related to some package used by apt.
UPDATE SSD was dying ad finally I had to switch to another server. Backups worked, no data was harmed during this incident.