With the caveat that I haven't attempted to crop PDFs for more than 5 years ...
At that time I seem to remember that GhostScript had the ability (commandline only) to, using your terms, "hard trim" a PDF which had previously been "visually trimmed" with some other utility (I used to use briss for the visual trimming).
Here's an old example I noted at the time:
Code:
gswin64c.exe -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=hard_trim.pdf visual_trim.pdf
It may be too old to be useful, but I offer it as an option to look into if you wish.