I have stopped any tests on this after putting some days into this. I am waiting for a helping reply, good that you join me in waiting. Generally, I guess that the error is linked with the same problem that causes ninja not to work. I do not know why I cannot use ninja. Setting off ninja is just a workaround, yet there should be a better way I think, because ninja will make the install much faster. I do not want to let it run for 7 hours again and again only to have the same errors thrown.
If you want to try something that seems promising, have a look at PyTorch build from source on Windows and further down, especially
set CUDAHOSTCXX=