The W6800X has two Thunderbolt buses, and can also use one of the Mac Pro's built-in Thunderbolt buses (top I/O, or I/O card).
You need one Thunderbolt bus for each LG 5K. If you use top I/O Thunderbolt bus for LG5K then you can't use I/O card Thunderbolt bus for another display and vice versa.
Don't use HDMI 2.0 for 4K - HDMI 2.0 is limited to 8bpc RGB or 10bpc 4:2:0. You don't want 8bpc or 4:2:0.
Connect the 4K display to any other Thunderbolt bus not used by the LG 5K displays.
You have room for one more 4K display after that (or a new Apple 5K or 6K display which use DSC instead of taking an entire Thunderbolt bus)
Each Thunderbolt bus has two DisplayPort connections to the GPU. The GPU has 6 total DisplayPort connections. I think HDMI uses up one of those 6 if you use it. The LG UltraFine 5K uses two DisplayPort connections from a Thunderbolt bus so you can't connect a second display to a Thunderbolt bus.
Two of the DisplayPort connections from the GPU can go to either the top I/O Thunderbolt bus or to the I/O card Thunderbolt bus, or one DisplayPort connection can go to each.
If the LG UltraFine 5K gets only one DisplayPort connection, then it can't do 5K60 but it might be able to do 5K39 with a custom timing (SwitchResX) or it will default to 4K60.
Use a Thunderbolt 4 hub if you run out of Thunderbolt ports.