You are absolutely right. So will needs some tweaks.
1. For removing of jpeg artefacts and similar noise in white areas will need make some sensitivity threshold. As examlpe, <10% grey will applied as pure white.
2. Now you implemented beveled embossing method (edge smoothing?) and similar algorithm needs to be saved for edges between "pure white" and 10%+ of grey value. Maybe, it would be internal mask over "pure white" with anti-aliasing of edges (soft mask by <10% grey areas). So first (10%+ grey, 0.5mm on picture) extrude (displace) will produce lite beveled walls, not as in my picture, but also not as now realized.
3. For produce custom geometry without "pixel's ladder" will needs some global public soft parameter (as you, maybe, already use into your app).
Current beveled custom elements are too soft in my opinion, so I prefer have some internal parameters for sharp tuning. Also, don't forget that small artifacts will be lost during 3Dprinting and finishing.
It you make a re-meshing into cropped custom place, maybe, will needs public parameter of new polygon density inside custom area.
Thank you for detail substantive discussion.