score:8
Edited 2-2-2022 (amended first sentence and first bullet point, added last 6 paragraphs)
This may not end well. Your plan has several problems:
While a B1/B2 visa allows some business activities, it does not permit employment or work beyond limited circumstances. This State Department webpage says "independent research" is permitted while on B1 status, but does not define "independent research. Because of your planned lengthy sojourns in the US, you are vulnerable to being seen as living in the US, and thus not a bona fide visitor.
When you tell the CBP officer you're going to stay for three months, you'll be asked how you'll pay for your long trip and support yourself. If you say you'll work remotely for a European NGO while you're in the US, you'll be confirming that you plan to work for money. Because this violates the terms of both the B1 and B2 visas, entry to the US might be denied.
That you have a US girlfriend is a red flag for the immigration officer, who will see that you have an emotional connection to the US, and will thereby be less likely to leave at the end of your entry period. Again, there's a risk of entry refusal.
You plan to stay for three months and, and after a three-month interval, return to seek entry to the US again. These long periods of time in the US will immediately suggest that you're trying to live in the US without an immigrant visa. That you have a US girlfriend supports this idea, and, as before, you risk having your re-entry denied. As a traveler to the US, it's considered a good idea to spend at least as much time out of the US as you plan to spend in the US.
Remember that 8 U.S.C.§1184(b) of the US Immigration and Nationality Act is a presumption of immigrant intent. This requires CBP officers at the border to presume that people traveling to the US with non-immigrant visas seeking admission actually intend to immigrate and stay in the US. The CBP Officer will know this. It's up to the applicant to dispel the presumption in order to secure entry.
Remember too that the CBP Officer will have, on their computer screen, a record of what you've previously written and said about traveling to the US. You should make only true statements when you're at the booth talking to the officer, and your statements should be consistent with things you've previously written and said.
In comments, @Doc cited Matter of Hira to support the idea that the OP here is indeed entitled to conduct online research while in the US on a B1 visa. @jcm cites a State Dept webpage that lists "independent research" as permissible.
Hira was a 1966 US Attorney General’s decision affirming a ruling of the Board of Immigration Appeals. It held that a B1 visa holder in the US, who took physical measurements of US customers on behalf of his tailor employer in Hong Kong but did not solicit customers in the US nor receive pay in the US, was eligible for B1 classification.
Hira lists the factors that support that finding, citing Gordon and Rosenfeld, Immigration Law and Procedures, presumably a then-current general legal reference on US immigration law. Those factors are a clear intent on the part of the alien to continue and not abandon the foreign domicile, and that the principal place of business and eventual accrual of profits remains predominantly in a foreign country. The underlying business may be continuing, but the visa-holder’s entries into the US must be temporary in nature.
Like the OP here, Hira accomplished tasks in the US and was paid by a non-US employer. Unlike Hira, however, 1) the OP’s long-duration stays in the US suggest that to feed and clothe and house himself the OP is likely to be paid while he’s in the US; 2) while Hira remained an overseas resident, the OP’s desire to work only remotely from various locations keeps the him vulnerable to a CBP or Board of Immigration Appeals finding that he does not maintain a foreign domicile; 3) the OP’s work of online research seems more skilled than unskilled labor; and 4) because of the OP’s remote (even nomadic) existence, the principal place of business and eventual accrual of profits cannot be said to “remain overseas.” These differences from Hira point to the OP's work being unacceptable during entry on a B1 visa.
The Hira decision admits that “Considerable difficulty has been experienced in the past in arriving at a clear and workable definition of 'business' within the contemplation of the statute.” The Department of State’s Foreign Affairs Manual agrees: “It can be difficult to distinguish between appropriate B-1 business activities, and activities that constitute skilled or unskilled labor in the United States that are not appropriate for B status.” In short, the statute is not clear and this is a grey area of immigration law.
All in all, I think the assertion that the OP’s facts result in the OP being able to work under his B1 visa overstates the case for B1 eligibility. I believe the OP is vulnerable to a finding that his working in the US violates B1 visa terms.