If (in universe), Picard for some reason did not survive or come back from TBoBW, would Riker have been automatically put in the center seat of the Enterprise?
And would Data have automatically inherited Riker’s position?
Purely from an in universe perspective, I feel like you might be conflating some variables.
1. In the very specific event that Picard never returned from assimilation, after Wolf 359, then yes, I do suppose Riker would've retained command over the Enterprise. It's not a total given, but very likely, because the promotion had already occurred (by an admiral who's now dead) and there'd be a pretty tragic shortage of other captains after the massacre. It would be sensible to just leave things as is, for all concerned.
2. Does that mean Data would then move up as his #1? Possibly, but he'd already promoted Shelby to that spot (which she certainly wanted) there might not be any official reason to alter that, after the fact. In this case, I surmise Data would stay at Ops as 2nd officer, & Riker wouldn't want to move people around.
3. In a completely different scenario, where Picard, retires, transfers, or accepts promotion, thru a normal administrative process, does Riker automatically get grandfathered into the captain seat? It's possible. I imagine his name is at least considered, but he's never done any service in such a post long term, the way Picard did before he got posted there, & that is a mark against him, for such a prestigious post IMHO
I suspect a Jellico type situation happens. There'd be established captains in line, who have experience & pull with command to get it, & it's pretty presumptuous for Riker to think he'd get consideration over them. If he's waiting around as Picard's #1, hoping to be grandfathered in, that's a pretty dumb line of reasoning, just asking to get blindsided.
I figure he'd get passed over, especially after having turned down 3 other commands. They'd put someone else in there, & he'd get butthurt. Then he'd likely transfer out, maybe even accepting a captaincy of another ship. In that event, Data
might get promoted from within, to fill his vacancy, unless this all happens in quick succession, and there's an opportunity for the new captain to pick from a list of 1st officer candidates, before he takes over. Then, Data is at a disadvantage for it. (For all kinds of reasons)
Whether he realizes it or not, Riker laying in wait, to replace Picard naturally, is only practical in the event a tragedy takes Picard, which is pretty macabre thinking. There's no guarantees he's considered as a suitable replacement otherwise though IMHO. "Inheriting" that position only ever seems to happen when the captain is lost & an urgent need arises for the 1st officer to assume the role, after which time the crisis might distinguish them enough to keep it permanently.
I can't think of any time someone just sat around waiting, while turning down multiple other commands, and then when the captain abdicates, they are moved in as a legacy hire, without any real time in the position permanently. That's a pretty terrible way to run your fleet IMHO. This is a rank structure, not aristocratic. "She's not the Enterprise" is a pretty idiotic reason to turn down a promotion.