Merging erases details on top object
I'll add here an example:

starting from an array modifier creating similar details



you should apply it: pressing the "apply" button you get something  like this



then if you join with the underlying shape



details are still there