There is a tantalizing scenario option about if R fouls *before* touching the ball due to the wording of the rule, but it's immediately cancelled out by the follow up that R cannot take a spot of first touching if *any penalty is accepted* during the down. I think the goal of this is that a spot of first touching cannot be a basic or enforcement spot for a foul -- the basic spot must be the previous spot, end of the kick or end of the run.
Secondly, R cannot use the first touching spot as a Get Out Of Jail Free card to nullify their own foul. R can take the spot of first touching if they decline a foul on K, but not if they accept one.
Finally, unlike the last group of threads, I think this is a case where "succeeding spot" actually works in a technical sense. "First touching" is a violation of the rules by K. They're not allowed to do that, but the "penalty" is giving R the ball at that spot. Ergo, if we're considering the spot where the ball would be put in play next *had the violation not occurred*, we must disregard a spot of first touching when identifying the succeeding spot.
To that end, I get the argument I made previously that you could make a subcategory of fouls that wouldn't apply in this scenario, but then we've got exceptions so it's "better" to go global and have a couple fringe cases where the ruling is "Yeah, that seems harsh, but maybe follow the rules next time?"
Fun fact -- At least in the NFL, but probably other codes, first touching used to be an actual "foul" by the rules. This means that if K downs a punt as the last play in a period, the period would be extended by an untimed down since there was an "accepted foul" on the play. This has, obviously, since been changed. There was an NFL films clip I remember from the... early 90's?... where they highlighted this as a "weird play" and asked a bunch of players/coaches if they knew the rule.