Past B1/B2 refusals and future F1 student visa chances

I applied for a B1/B2 visitor visa twice last year and was refused both times under section 214(b). I have accepted this result, but I am planning to apply for an F1 visa for my master’s degree in about 3 to 4 years. My main worry is whether these past rejections will automatically lead to a denial for the student visa later. Also, would traveling to countries like the UK, Schengen area, or Japan in the next few years help improve my profile? I want to build a strong travel history to show I obey visa rules.

Realizing this is not about an immediate re-application but a long-term strategy, the dynamic changes significantly.

Has anyone from a similar background actually utilized a third-country travel strategy to successfully overwrite a US rejection flag?

I was situated in a comparable predicament regarding a visa application where previous records influenced the outcome.

Regarding the travel history aspect, realizing this is not a guarantee…