Golem spell immunity is perfectly equivalent to having infinite spell resistance, and nothing more.
In the case of buffs on others, like freedom of movement, those don’t do anything to the golem—their effects exist entirely on their targets. There is nothing for the golem to be immune to. The golem prevents spells from being cast on it; it does nothing about magic altering reality around it, which is what freedom of movement does.
Also, I dislike that freedom of movement completely shuts down grappling as a viable strategy for both PCs and enemies at higher levels
This is completely fair; freedom of movement is a completely bonkers spell...
SR and magic immunity bypassing it seems like an elegant solution.
...but I could not possibly disagree more strongly with this.
SR is a clunky, problematic mechanic. The rules are not well-designed in the least.
Figuring out how on earth to extend spell resistance (and, by extension, golem immunity) to affect things beyond the being that has them—preventing spell effects on other creatures, objects, and locations—is a dubious exercise. You might feel that you can just say “well the golem can treat you as if you didn’t have that SR-Yes spell cast on you,” but that will be nearly impossible to consistently define. What does it mean for the golem to ignore, say, the flight speed someone got from fly? I don’t know—and neither do you. And that’s literally just the first spell that jumped out at me when I gave a quick scan of the core spell list; there are going to be dozens, if not hundreds, of spells who are going to need individual adjudication. It’ll be a complete nightmare.
And so what will happen instead is that the DM’ll just “go with their gut” any time SR is involved, and golems and the like will become mystery boxes where the game is to read the DM’s mind about what works and what doesn’t. Personally, I’d have zero interest playing that game.
Finally, as overpowered as spellcasters are—and they absolutely are—turning off magic is a terrible “solution.” Yes, if you force the party into a dead magic zone, the cleric and wizard will be useless.1 But that isn’t any better than the monk being useless otherwise. You still have a broken game—a game where some of the players are told to stop playing for a while. No one picked the wizard class to play a powerless know-it-all; they picked the wizard class to cast spells. Denying them the opportunity to play for any significant proportion of game time is rude, and is rather likely to lead to those players finding something better to do with their time.
There are, simply put, vastly better solutions to the problems of overpowered magic like freedom of movement. My personal preference for that is quite simple—in E6, freedom of movement isn’t overpowered because no one can cast freedom of movement.2 A cleric of travel might have a few rounds per day of it, at most, and that doesn’t even work on grapples. There are, of course, other options if you wish, though.
Barring Cheater of Mystra, which if you’re pulling dungeon-wide dead-magic zones, I’d say you actually managed to deserve it.
HeyICanChan points out that heart of water is 3rd level, and that can be discharged to achieve freedom of movement for one round. That is still extremely strong, but it at least gives a grappler a chance to re-establish their hold the next round.