are the apps being uninstalled during OS update? I haven't updated my Nexus 5X OS version for a long time already, due to the fact that I'm really afraid that something might go wrong with the state of some of my apps. 

For example, my WhatsApp history goes back to 2011. The folder size is ~5GB and holds more than 29,000 files. A few times before the app produced a warning shich stated that its state is corrupted for some reason ("something went wrong") and that a restore is needed -- each time it took hours, and almost never succeeded immediately (I had to re-install and change some backup file names).

So, my question is basically -- what are the steps of the Android OS update installation process? Does all the apps being uninstalled, then the new version of the OS is being installed, and then the apps are being installed again? Or is there some "intermediate state" for the apps, which can provide an option for the apps not to be uninstalled in the first place?
If you do a normal system update (no restore or something like that) your apps are not uninstalled. The system doesn't really do anything with your apps at all until it finished the system update. Then the system will recompile all apps (The 'android is optimizing apps' dialog) in order to make them run faster. This should not interfere in any way with your data. 

I do not know about your specific problem with WhatsApp or if a system update could cause your error but your data will not be touched by the system during the update. This means if something breaks whatsapp your data will still exist in order to restore your history.

Btw. what android version are you running? With android 7 the recompile step will partially change (to the good).