If the bits going through your router were the only way Facebook gathered data about you, that would make sense. But it's only one way. You don't even need to have a Facebook account to have a Facebook profile.
So how is Facebook filling up my profile with no input data? They might create a profile based on data my friends publish, but they won't be able to connect it with my IP or my identity.
I found none, that's why I'm asking. There is technologically no way to connect me (my browser/phone that sends no information to FB) and my "profile" made up by a few photos of me that my friends have uploaded.
I had tried to implement similar blocks through uBlock Origin and similar browser addons, but this seems to be the most robust method as I use multiple different browsers on my primary computer.
Also, editing a hosts file does nothing on FB's end (which is what this article/discussion covers).
You can use also a local DNS server for your whole home network. If you think it is too much work you can use something ready-made like pi-hole [1]. The nice part is that it will work also for your phone while you're on wifi.