Beetles Eat Wood
I can confirm that the beetle in your first image is a powderpost beetle and that the larvae of this beetle do indeed "feed on wood and, given enough time, can reduce it to a mass of fine powder." Wikipedia
It is likely that you are going to have to replace the wood where there is an active infestation (as determined by the fine sawdust under the wood pieces). Re-infestation can be prevented by treating any raw wood with a paint or varnish coating.
I do hope this helps!