I made some progress. Managed to print, but had to:
Discover the IP address of the printer instead of using the address discovered automatically.
Choosing a Generic PCL5e driver.
I printed a test page and it did print, but the right line was cut off. There seems to be an offset, the left margin being slightly wider than than the right one.
I couldn’t add the printer manually with the IPP printing protocol. I managed to do so from the command line using its IP address with the command: sudo lpadmin -p myprintername -E -v ipp://10.1.2.3/ipp/print -m everywhere
Changing myprintername to the name I desired and the IP address to the one I had discovered.