Hi, french here! That's quite funny, I wasn't aware of the figurative meaning of "courge" before your post.
Therefore, I'm pretty sure that "courgette" is, as you figured, a wordplay to mean a little idiot considering that a "courgette" is a variety of "courge" but smaller and edible at a very young state. So many…