So I realized Unreal might be interpolating normals (e.g. from the vertex) and that can be a source of smooth normals.
I decided to enforce flat normals by creating a test material with a flat normal map:
It did improve the intensity of the edges, but they are still a tad visible if you look closely (middle halflit triangle and one of the triangles on the right):
The shadow mask is still ugly:
If anyone knows how to further improve this, that would be great, thanks!