On macOS Mojave, if you try to paste a folder with some name (let's say
My Folder) into a different folder, let's say which is called
Parent Folder, which contains a folder with the same name as the folder you are copying (i.e.
My Folder), then one of two things will happen:
If the folder you are pasting contains the same files as the folder you are trying to paste over (i.e. the
My Folder inside the
Parent Folder), then you will be asked to "Stop" the operation or to "Replace" the folder.
If the folder you are pasting contains different items from the the folder you are trying to paste over, then you will be given both of the options from 1., but also an option to "Merge" the folders. According to macOS, this is what merging does:
Merge will combine the two folders, preserving all the newer items such as “My Picture.png”.
You also seem to be saying that macOS doesn't warn you before replacing folders. macOS's default behavior is to show you a dialog box with "Stop" and "Replace" (as in situation 1) or with "Stop", "Replace", and "Merge" (as in situation 2).