As luck would have it, in 2016 one of the KDE developers reassembled the 1.1.2 release of KDE, i.e. the endpoint of KDE 1.
From that rerelease you can find the KDE 1 version of khtmlwthe KDE 1 version of khtmlw.
As per the modification dates, some of these files have been updated to build in the [then-]modern world. But checking the commit history, commit bffedd0commit bffedd0 appears to have been the final change made to khtmlw for KDE 1, back in 1999. So you can clone the repository and check out that commit to undo the modern alterations if desired.
Commit history otherwise seems to extend back to Apr 13, 1997 so all intermediate versions between then and 1999 should be available.