But which size should the LUN have? What do you think?
The minimum is the best starting point, though 8GB's is a nice even number to work with. Not much benefit going larger if you are going to keep all logging and scratch data on external storage and with default settings.
Or should the LUN maybe be even smaller than the 5.2GB so that ESXi will create the scratch partition on a local SSD?
Going below this can cause issues with upgrading the host.
Or is the better performance of the local SSD for the scratch partition irrelevant?
Higher performance for the scratch is not going to be noticeable.
What will happen if there anytime the RAM of the ESXi get's full and it needs to swap?
VM's will resort to swapping when RAM is low.