He can submit an online FOIA request to CBP for all entry/exit records and all records of his secondary inspections. The response will be a small stack of heavily redacted documents but may include notes from the CBP officers shedding light on why he was stopped and what they were trying to sort out.
He can also ask the CBP officer, "why do you guys keep pulling me aside," which the CBP officer may or may not answer, and that answer may or may not be truthful.
What normally happens when he gets the X, do they question him, for how long do they question him, etc. And what's the nature of the "potential felon's" potentially felonious acts?