It has worked for former statewide officeholders on plenty of occasions. John Thune unseated the Senate majority leader two years after losing his House seat, Mike DeWine made a comeback as governor, etc. This is not even counting candidates who remained row officers after losing a statewide race and went onto win another statewide race (Alison Grimes, probably Matt Rosendale this year, etc.).
All that said, the most prominent recent example if/when Ernst runs again will be McSally and that isn't going to help her at all in the primary, however unfairly any parallels are drawn.
Not sure if you intended this, but your post makes it sound like Thune lost reelection to the House. He gave up his House seat to challenge Tim Johnson for Senate in 2002, and lost by about 500 votes, and then beat Daschle in 2004 by about a percentage point.