Late to the party, why has no one mentioned a Google change of address from an old domain with backlinks and (for example) should you want to rebrand?
I guess my own rebrand experience may help others here, this around 4 years ago. I bought seolady/couk a couple of years after my original domain but just let it sit there.
I'd 301 redirected it to original brand, once I had the new branding logo and creatives I was ready for the switch. At the same time I was installing SSL/HTTPS so it was a 2 birds 1 stone scenario.
To ensure you know 100% that you have retained rankings, first of all you need to benchmark your current search phrases in Google (I use a spreadsheet and search manually, I don't use tools to track my keywords) then verify both domains by upload an HTML file to your website from Google Search Console.
In my case I swapped the domains over when they were both verified, as I'm not eCommerce all my URLs stayed the same. I then completed a Google change of address from my old domain to my new one and asked for a crawl (Now called 'URL Inspection) on both domains and also both sitemaps.
I proceeded to create new blog posts on my new domain and continued my SEO work on my target search phrase "SEO Freelancer UK" and after 18 months I nudged up from Google page 2 to page 1.
I've also got a case study from 2015 in an identical situation of a rebrand which was ecommerce, exactly the same routine except this time we ran into trouble. The client and I had benchmarked around 30 important 'money phrases' with 1 specific search phrase which bought in the most wonga.
Whaddya know, the developer I worked with completed the migration EXCEPT one category URL had changed, if you guessed it was the number 1 primary money phrase then you get a prize.
As a remedy I implemented a 301 redirect as standard and asked for a recrawl. If I remember correctly it took around 10-14 days to get back to Gpage1, pos 1 for the money phrase.
At present, I have a niche dog trainer who bought her name as a domain around 12 years ago, she recently had a rebrand because she's released a niche dog training book and used a 9 month old domain and her rankings have dropped. I completed the process of verifying her old domain (checking the stats she has some lovely niche backlinks) then once again used the Google change of address tool.
This was last month and I checked her stats last week and it's made a positive difference.
So, whilst domain age may not be a ranking factor, the trust factor assocated with an aged domain which has garnered backlinks does help in my experience.