Forget about disabling javascript completely, you're right that it breaks everything. instead try using undetected-chromedriver or playwright with stealth mode. these tools randomize your browser fingerprint and make you look more human. also rotate your user agents, screen resolutions, and add some random delays between actions so you're not hitting their servers like a machine gun.
here's the thing though, facebook's detection is getting scary good these days. consider using residential proxies and maybe even running your scraper on different machines if you're doing this at scale. oh and if you're just starting out, maybe practice on easier targets first before going after the big blue monster. facebook will ban your ip faster than you can say "zuckerberg" if they catch you.