These were our flights:
20/07/2022 AA 57 10:40 Heathrow Terminal 3 -> MIA.
20/07/2022 AA 1939 18:43 MIA to SJO
09/08/2022 AA 1204 07:00 SJO to MIA
09/08/2022 AA 38 19:35 MIA (arriving Heathrow at 09:25 on 10/08/2022)
I’d really recommend avoiding connecting flights and getting a direct flight if possible, even if it costs more.
At the time of booking, we could only get direct flights to Costa Rica via TUI, but they wouldn’t let us book flights more than 2 weeks apart and we wanted to go for 3 weeks, so we didn’t have many options, especially given the Covid situation at the time of booking (November 2021). TUI’s flights are into Liberia, not SJO, and I’d booked our route (starting with Cahuita on the Caribean coast…) where an SJO starting point was better anyway. However, as the SJO plane was diverted to Liberia, this ended up being a moot point!
I think ‘next time’ I’d fly directly to whichever CR airport I could if the flight was direct. If there were no direct flights, I’d probably look to do the connection in Europe rather than the USA. USA connecting flights usually require you to collect your luggage and check it in again, and although we didn’t have to do this, we still had to go completely through immigration, get ESTAs organised, and go back through security to the departure lounge. This experience was not fun, literally took hours (so would be even more stressful if you are pushed for time for the connecting flight) and I’d really recommend avoiding it if you can!