The Rogue’s Expertise in stealth lends itself well to this role. Choose backgrounds that reflect your desired intelligence and personality, such as academic background or noble/king’s general servant. Take skills like Deception and Insight.
One of the major schools of crime developed by William Kennerth Thompson- is one which has been expressly designed for the mastermind assassin. Here, Thompson lays out a detailed roadmap on how he planned for his assassins to infilitrate high society, identifying the target’s daily habits with utmost scrutiny before stabbing them in their own home or other “safe zone” while they were unsuspecting- taking care to do so when guards were absent! In fairness, most of this type of assassination also involves murdering the target’s entire family as well- often including their servants- so they have no one to turn to after they’ve been killed.
Anyways, most of this roadmap is what we’ll refer to as “social engineering”- with a specific focus on interpersonal relations: knowing who someone is and how best to use that information against them. However, don’t ignore the “physical engineering”- as a mastermind, you should also know how to utilize a weapon and equipment that is not only easy to conceal- but can be used against your enemies with maximum efficiency.
To this end, I think the Rogue’s Expertise in stealth fits Thompson’s vision for his assassins well: going back to our example of a “noble’s servant”, perhaps your character’s family is known as the most loyal and trusted servants for several generations- so it makes sense to have them trained in weapon skills from a young age.