This is a solved problem. Employees of RIAs have the same trading restrictions. The SEC's adopting release[1] of the RIA Code of Ethics requirements gives a pretty good overview of how it works in the "Personal Securities Trading" section. Each RIA firm has their own policy implementing the rule but here's an example of how family is typically defined from a random firm's policy I found via DDG:
> “Immediate Family” generally means any relative by blood or marriage living in the individual’s household, any domestic partner or other minor child residing in his or her household and, whether or not living in the individual’s household, any other relative with respect to whose investments the individual has influence or control.