I do think it would probably be good if machine-guns were allowed to choose Formation (the anti-mounted promotion), but it's a bit technically difficult to enable any promotion to machine-guns without also enabling the same promotion on all the other siege units. (eg. catapults and cannons.)
The availability of promotions is primarily determined by the unit's 'combat type'. (Combat types include siege, melee, gunpowder, etc.) But also, unit's are not allowed to choose promotions which give a bonus that the unit cannot use. For example, machine-guns can't choose City Raider, because machine-guns cannot attack; and Explorer's can't choose Woodman III because they also can't attack and that promotion provides and attack bonus. However, since Formation affects both offence and defence, enabling it for siege units would enough it for machine-guns and catapults both.
One option to get around these promotion rules would be to create a whole new combat type, called 'defense guns' or something like that. If machine-guns were the sole member of their own combat type, then it would be easy to enable and disable whatever promotions we like, without affecting any other units. That would work, but I think it's an inelegant solution, and I'd rather not do that.
Perhaps the obvious answer is that machine-guns should be gunpowder type. They certainly seem like they should be gunpowder units. But that would be a pretty major balance change. If they were gunpowder units, not only would they have access to the coveted City Garrison promotion, they would also get the free promotions from the Protective and Aggressive traits, and they'd suffer the penalties of +attack vs. gunpowder promotions and bonuses from their enemies and stuff like that. Maybe that's all fine, but it would probably mean some additional balance tweaks would be required.
I do have another option in mind though. Currently, defensive promotions such as Woodsman and Guerrilla will still work on units with "no defensive bonuses" - but to the best of my recollection there are no units with "no defensive bonuses" that can get those promotions. So, I could change the game rules such that "no defensive bonuses" actually blocks defensive promotions without having any gameplay effect in K-Mod. With that rule change, if I then enabled defensive promotions for siege units, those promotions would be available for machine-guns but would still be unavailable for cannons and catapults. That would work for Woodsman, Guerrilla, and City Garrison. The downside is that it may mess up someone else's K-Mod based mod if they happen to be already using defensive promotions on units with "no defensive bonuses" - but if that stuff is important to some modder, then hopefully they can work out how to fix it for their mod.
I actually think machine-guns are pretty useful already. I use some of them in most games I play, and occasionally they play a key role by negating the effects of collateral damage, but generally they do get somewhat overshadowed by the versatility of Infantry. I think allowing a few more promotions on machine-guns would make them a bit more interesting and versatile. I don't think I'd want them to have City Garrison available directly, but I'm thinking that both Woodsman and Guerrilla might be ok. Although it may sometimes result in some impregnable choke-points...