It seems to me that you are combining different files with separate logic into one file? This is not what a git file merge is.
From git help merge-file:
git merge-file incorporates all changes that lead from the <base-file> to <other-file> into <current-file>. The result ordinarily goes into <current-file>. git merge-file is useful for combining separate changes to an original. Suppose <base-file> is the original, and both <current-file> and <other-file> are modifications of <base-file>, then git merge-file combines both changes.
Example (also from the help page):
git merge-file README.my README README.upstream combines the changes of README.my and README.upstream since README, tries to merge them and writes the result into README.my.
To combine logic with completely separate files into one, you are right to combine them manually.
Deleting a file does not delete its history; you can view the log of the deleted file using
git log -- <path_to_file>
See related questions / answers:
Git: how to search for a deleted file in project commit history?
Find and recover deleted file in git repository
source share