While the toxins that are proteins are usually inactivated by cooking, some of the other substances require additional steps, which were always used in traditional cooking, but not all modern cooks are aware of them.
For example, all the kinds of seeds, including all kinds of dry legumes and all kinds of nuts, require soaking in water for many hours and the water must be dumped and they must be washed before cooking, in order to remove as much of the phytic acid as possible.
The soaking in water is much more efficient if the water is acidulated, e.g. with lemon juice or with vinegar.
Another example is with the vegetables rich in oxalic acid, e.g. spinach, which must be boiled in several stages. After each stage, the boiling water must be dumped and replaced by fresh water, in order to remove as much of the oxalic acid as possible.