From memory, last time I was looking into this, it would seem that there was a couple of reasons for Oak being the traditional wood for ageing, barrels, etc etc.
Yes, some woods are indeed toxic, though it seems that it depends on many factors.
As for Oak ? Well it was the wood of choice, as it was freely available and abundant in UK/Europe. It was long lasting, didn't rot, plus oak obtained from tree's grown in cooler climate areas was often very close grained and less prone to leaking/seepage etc (think Hungarian Oak and French Oak from the Limousin area).
Plus, when toasted, it was capable of imparting good flavours to distilled spirits, from the tannins, vanillins, etc etc.
Yes, other woods have also been used, but often only for specific beverages made in the areas that the wood was abundant i.e. chestnut etc.
Hence it seems that Oak became the wood of choice/tradition.
Don't forget, lots of this kind of stuff was learned about and sorted out long before the US was settled. Though once it was, "they" then used some of the indiginous oaks found there, but that they often imparted a different flavour and in differing quantities compared to the European equivalents. Though that's not necessarily a bad thing.
If you think about it, you're unlikely to find a French vineyard or chateau that makes cognacs or armagnacs, having even so much as a match stick of American Oak. Traditions for making beverages to a specific area and/or flavour are very strong and don't change quickly.
regards
fatbloke
p.s. Oh and don't forget, especially in France and UK, Oaks were planted specifically for use in sail powered warship building. The use in cooperage would have been secondary......