I couldn't champion your bulleted points harder. Honestly, if I had a say in it, any tech writer working on developer documentation should be able to code/build/perform/use whatever task or api they're documenting without the help of an engineer. They should be able to read and understand code, and they should be willing to do so, even more so than the average engineer using some library code. They should be capable of understanding a library deeply and synthesizing and summarizing that understanding for users of the library.
Just as tech writers in the medical field need to know quite a bit about medicine, tech writers in software should be required to know quite a bit about engineering software. There's plenty that do, but there's also quite a few that don't--I think it's a side effect of the field's relative youth.
I really wish more writers would code and do exactly the things you mention, such as implement robust code sample testing, etc.
The ideal technical writer, at least for software engineering documentation, is a hybrid of a traditional technical writer and a software engineer[^1].
[^1]: This excludes user-facing software documentation, which is essentially a totally different field than those that deal with writing for developer or engineer audiences.