Earlier quoted context omitted.
One alternative is sandboxing the js code (or using existing browser or networking logging capabilities) to reverse engineer network requests and write a more raw client instead of piggybacking onto the web client, that would still have risks of changes but less likely than this.
> reverse engineer network requests and write a more raw client People already have done that. The most famous example is the yowsup [1] python library. The problem with these client implementations is that WhatsApp is banning any numbers that use them [2]. So most recent attempts to use WhatsApp outside of the official clients revolve around using WhatsApp Web somehow. That appears to work better, but even here if y…
1) They're using outdated versions of the protocols, which they won't be motiviated to fix until those old versions are cut off server-side and their implementation suddenly stops working. 2) They never quite figured out how to correctly handle all the nuances and corner cases of the E2E encryption, so that part of their design is extremely fragile (just look at the issue trackers for all the evidence of this that you need).
On top of all that, the maintainers have basically given up and abandoned the projects... So they're not even being actively maintained.