how can a home-made controller device be recognized by a UE4 game?

Yes your device should be recognize by your laptop in most of the cases - since you do not tell us what interface the device is using I can not answer this question.

You shouldn’t modify UE4 Code for such a reason - Maximum issue a plugin for that.

You have not to bind your device to any mesh…
You should make your device as a generic Input for UE4…

Keyboard and mouse are not bound to any mesh right? They are bound to input controller
so if you want to make a controller - you should do the same.

Take a look at SteamController source code to get started.