When and where would you make customs declarations when departing the U.S. by a scheduled passenger flight?
You have to go to a customs office yourself, presumably before going through security (which could be taken as evidence that you did not intend to declare your gold bar). In most airports I have been to (admittedly most of them out of the US), there would be some nondescript office hidden somewhere in a corridor.
This webpage from the United States Council for International Business is about ATA carnets, not cash control, but it lists a number of airport customs offices. Depending on the time of the day, you might need to phone in advance to make an appointment and/or somehow get someone from the arrivals terminal to look at your things. Apparently, in JFK, you even have to go to a completely different building located somewhere close to the airport grounds.
The CBP is quite vague on the “when and where” but a note at the bottom of the form suggests you can only hand it in immediately before departure if you are carrying currency with you (i.e. not in advance or by mail, like you would for a shipment) - although CBP enforces the $10,000 cash import/export limit at the border, the Treasury Department's FinCEN is actually in charge of processing the forms, so you should direct questions to them on filling them out.
How would ICE even know you had something declarable with you if you didn't tell them?
Presumably in the same way that they know about most things: Through an investigation and especially because someone tipped them (could simply be the check-in attendant or a TSA agent but also a former boyfriend or business partner…).
All this feels pretty standard to me. Customs in Europe do not rely mainly on systematic luggage inspections, interviews, declaration cards and the like. On land borders, you can often drive through without talking to anyone and many border crossings have nothing more than a sign. If you need to, it's up to you to approach the customs, including by phone, in a timely manner (cars can also be inspected some distance away from the border, incidentally).
In airports, there is the red/green/blue channels on arrival that represent a clear boundary/point of contact and a sort of implicit declaration but immigration checks on exit do not necessarily have any customs purpose and for (EU) citizens, they typically do not even ask any question. Those checks are manned by another agency/police service and are not equipped to deal with customs formalities (but the customs desk is often not very far away). So it's still up to you to track down a customs officer, just like it is in the US.
The only question is at which point your intent to leave the country without filing the necessary declaration is established. Obviously, it's somewhere between coming to the airport and actually sitting in the plane but going through security or waiting at the gate seems as good a clue as going through a passport check to me.
For cash control, it's sometimes possible to file a declaration some days before the trip, by mail, although that's not the case in the US, as mentioned above. For other things, like works of art, it might even be necessary to do the formalities in advance and already have all the documents with you when coming to the airport in any case.