After a quick think and a quick glance at M-W, it looks like the "stupid" meaning of goon predates the thug meaning. Simple connection between the two: It's important the thug has very few thoughts of his own, follows orders and gets on with the job exactly as specified. This is also, of course, his (theoretical) weakness.

for etymology, M-W suggests:
probably short for English dialect gooney (simpleton)

- which is suspiciously close to the suggested etymology for goof (at least in meaning):
probably alteration of English dialect goff (simpleton)

So you could say Goofy is a bit of a goon.