WhatsApp sends messages before I've finished typing
As @beeshyams suggested, the problem was not WhatsApp but my keyboard (I am using TouchPal). I don't know what exactly was causing the problem, but uninstalling and reinstalling the keyboard solved it completely.