From an email I received from the U.S. Customs and Border Protection (CBP):
Due to the increasing number of FOIA requests received by this office, we may encounter some delay in processing your request. Consistent with 6 C.F.R. Part 5 § 5.5(a) of the DHS FOIA regulations, CBP processes FOIA requests according to their order of receipt. Although CBP’s goal is to respond within 20 business days of receipt of your request, FOIA does permit a 10-day extension of this time period in certain circumstances pursuant to 6 C.F.R. Part 5 § 5.5(c).
In my own experience in fall 2021, it took the CBP approximately 30 days (including non-business days) to process my online FOIA request for my entry/exit.
I found some contradictory feedback on the web:
If you are unable to locate your travel history records through the methods listed above, you can submit a Freedom of Information Act (FOIA) request to U.S. Customs and Border Protection (CBP). Generally, personal FOIA requests are free (if less than 100 pages of photocopies). Be sure to limit your request to the previous five years. You only need five years of history for the purposes of the N-400 application. A more extensive search will take longer and may even result in a photocopy fee (up to $25). A FOIA request will generally take several weeks.
3 to 6 months.