Then you "understand" incorrectly.
1815 U.S. Marshals work as police against pirates and the territory gained through the Louisiana Purchase that later became a state. Louisiana Purchase
1865-1900 The various labor disputes of the late 1800's caused civil disturbances where U.S. Marshals were called upon to maintain law and order as an alternative to military intervention.
1882 U.S. Marshals tried to keep law and order in the old west. Four Deputy U.S. Marshals Virgil Earp, Morgan Earp, Wyatt Earp and Doc Holiday participated in a gunfight at the OK Corral.
1888 Animosities between Republicans and Democrats peaked in violent outbreaks at the polls and tampering with ballots. U.S. Marshals upheld the Constitution by controlling disturbances at voting sites and preserving the citizen's right to vote.
1889 U.S. Marshals helped maintain law and order in the Oklahoma Territory.
1894 During the Pullman strike, U.S. Marshals were ordered by the federal courts and the Cleveland administration to keep the trains rolling.
1896 The Justice Department created salaries for Marshals. Before that, a Marshal received $2.00 for any outlaw he brought in alive. However, if an outlaw were killed during his capture, the Marshal received no compensation and was responsible for the burial fee for the dead prisoner.
1920 Until the Treasury Department created the Bureau of Prohibitions in
1927, the U.S. Marshals were the enforcing agents of the Prohibition laws that forbid liquor. Prohibition
You simply make it an arrestable offense... especially around political gatherings (much like it is in bars). Like any law you won't catch everybody but actual arrest will remove some and fear of arrest will remove many more.
It pares the problem down to a much, much smaller and more manageable number.