Hey there @kurylo3d! As MH mentioned, you’re going to want to use instanced static meshes and instanced materials when you can to reduce overhead when used appropriately. I can’t speak to the engine doing this automatically before, but there is some things in place to help with saving a bit on shaders, but it’s minimal and usually developer managed.
And as a bonus, here’s a good post with some more resources: