If corrupted chunks were a problem you could have tried optimizing the world. Maybe that could have solved your issue.
Had this happen on a vanilla 1.14 server. 15+ villagers (sitting in minecarts) disappeared in my trading outpost after the server crashed twice. Thank god I had a backup...
The server log is full of these warnings:
"Keeping entity minecraft:llama_spit that already exists with UUID 9ce28ce2-a2eb-462b-9f68-61095cf2600e"
after eventually finishing it off with:
"Server Watchdog/FATAL A single server tick took 60.00 seconds (should be max 0.05)"
and crashing.
I am attaching the crash reports.
I am thinking going to the spawn chunk triggered the crash, because I was able to replicate the crash on singleplayer by going to the spawn chunk using the nether portal.
I assigned each of my librarian villagers from 1.13.2 a lectern without a problem. You can use /data get entity <villager UUID> Brain to debug the villagers (you need to be op though).