"Internal Exception: badly compressed packet" upon entering server
I later found that this error is due to the fact that the stacked armor I was duping had too much data, the packet had around 3 megabytes of data which is far too much. Be cautious with large amounts of books/illegal items like stacked tools! There is a risk of chunk-banning yourself like I did, and without admin privileges there will be no way of reentering the server.
All you need to do to fix this error is to destroy the items that are causing this (in my case they were stacked armor with max enchants, but they can also be books with large amounts of text, or any other item with too many NBT tags).
Edit: It seems that items in your inventory can also contribute to this issue.