A bit off topic but I’ve seen a few posts about thunderbolt docks, but what I really need is a thunderbolt KVM that can drive a 5k (or more) display between at least two MacBooks.

Does anyone have a recommendation? My searches have not been fruitful.

Not quite what you are asking for, but perhaps display-switch[0] can help. I'm too cheap to get a KVM which supports 2 4k monitors so I'm using display-switch instead. Works wonders.

[0] https://github.com/haimgel/display-switch