The assessment that the weapons deal was done to "counter-balance Iran" is wildly charitable. If one is concerned that a tyrannical, theocratic terrorist state is a threat to peace, one does not address that concern by funnelling billions of weapons to their more tyrannical, more theocratic and more terrorist neighbour.
The kingdom is widely suspected to have funnelled funding and weapons to ISIS and other groups fighting Assad in Syria, an enemy of theirs. There's been leaks of high-ranking US officials espousing the claim, meaning the US government has intelligence that corroborates this. Trump would have agreed to the weapons deal aware of that intelligence. There's also lots of rich Saudi individuals funding a range terrorist groups aligned with the kingdom's agenda (including Al Qaeda, Al Nusra and the LeT), which the kingdom is aware of and does nothing to crack down on.
The Saudi Kingdom is also using the US weapons to wage an illegal war in Yemen, targetting schools, hospitals and other fundamental civillian structures. Millions of people have already died, and the warring has been so ruthless that the Saudi kingdom has actually caused a famine. They are trying to crush the houthi rebels, which are aligned with Iran, in spite calls from the Houthi rebels for a ceasefire. These calls have been ignored, even in spite of the recent Corona outbreak. The weapons the US gov. have provided have played a critical role in allowing the Saudis to carry out this slaughter.
The Iranian regime, though terrible in their own right, comes nowhere close to causing the level of devastation in the Middle East that the Saudis do. It should also be noted giving the Saudis weapons to fight catastrophic wars with Iranian proxies has done nothing to actually deter Iran's influence in the Middle East. In fact, these actions have largely helped to vindicate the terrorist groups like Hezbollah and Hamas that Iran supports. A cynic may guess the US doesn't actually wish to truly destroy Iran's influence, because the presence of the Saudi/Iran rivalry creates a powerful demand for US weapons, and Iran's isolation allows the US to control the bulk of the world's oil exports.
It is, in my view, far more plausible Trump is simply swayed by the millions in funds he's personally received from Saudi Arabia, and the extensive funding Saudi and Arms lobbyists funnel to the Republican party (and the Democrats). The Saudi government also sells its oil in dollars, which lends the US major economic power. There's also the following famous Trump quote regarding the kingdom:
“Saudi Arabia, I get along with all of them. They buy apartments from me. They spend $40 million, $50 million... Am I supposed to dislike them? I like them very much.”