The introduction of the 1500 hour rule in FAA land did result in some US Airlines offering Visas to foreign pilots that held 1500 or more hours; however the Covid situation has probably now curtailed this. This only happened in the last year or so. Prior to the 1500 hour rule then you are correct, marrying a local was the near enough the only way for a non-US pilot to obtain work in the US.
There were some EASA approved schools based in the US that use to offer J1 visas which allowed non-US instructors to work for a limit of 12 months. I always thought EASA wanted to stop EASA training in Non-EASA states, but there still seems to be a few schools in the US holding EASA approvals. That said there seems to be far less US schools holding EASA approvals compared to the number that were around under JAA.