I couldn't get the legend to wrap automatically for some reason but there is an nrow argument available for legends.
library(ggplot2)
DF <- data.frame(Name = rep(LETTERS[1:4], 4),
Sub = rep(c("Long Name and Even More More 1",
"Long Name and Even More More 2",
"Long Name and Even More 3",
"Long Nmae and Even More 4"), each = 4),
Value = runif(16, 1, 20))
Plt <- ggplot(DF, aes(Name, Value, fill = Sub)) + geom_col() +
theme(legend.title = element_blank(),
legend.position = "top",
legend.box = "horizontal",
legend.box.just = "left")
Plt

Plt + guides(fill = guide_legend(nrow = 2))

Created on 2020-01-03 by the reprex package (v0.3.0)