What is this wood-infesting insect?
To close this, we're now reasonnably sure that they were carpenter ants or a close relative. One more clue is that they infested the wood close to a window receiving sunshine and were much more active when it was warm there. Thanks to @user137.