Wow, brutal.
Discussion
I've lived in 3-4 different HOA communities across multiple states and never seen a foreclosure so that is definitely an extreme case.
If the HOA is managed right and you don't have power hungry Karens on the board, it has been a net benefit in my experience. Here in Vegas, you can tell HOA versus non-HOA communities pretty easily. Those HOA communities typically have greater resale values, don't look run down, etc.