Can't get Brother MFC-J5340DWE to work properly

MFC-J3930DW here so not sure how applicable it is, but I had to write my own derivations for the driver — partly based on some other attempt I’ve found in some random repo, but it required quite a bit of additional debugging to figure out why options like paper size don’t get propagated to the printer properly. The biggest issue were the perl scripts not resolving files where those options were defined properly and the simplest solution was just wrapping it into FHS (but some choice patching was also required). It doesn’t work 100% perfectly in that some options need changing in CUPS default to work reliably, but I change them rarely enough I didn’t end up tracking it down yet.

Not sure how helpful that will be for your problem, but figured I might as well share: