I've noticed in the past 2-3 months that results from StackOverflow, Wikipedia, and official programming language documentation sites seem to have been abruptly downranked. They used to typically be in the top 3 results for me for appropriate queries, but now they frequently aren't even on the first page.

Yes and on the other hand sites like codegrepper and other such scraper/scam sites are frequently showing in my search results - which are just SO results.

I don't know if they're gaming Google's search or google is actually condoning this (like they've been condoning pinterest's shenanigans for almost 10 years now)

There is a ublock origin list which you can import to filter search results:

https://github.com/quenhus/uBlock-Origin-dev-filter