I did just this. I was with the same company for 18 years, only ever had 2 roles and barely an increase in wages. My kids were young though, so it worked although I felt absolutely stuck and became quite fed up. I went on to take a years fixed contract with a company (which I hated) but a few weeks into this new role, as I was still applying for jobs, I was offered another years fixed term contract into a more fun job which I jumped at.
During that year I did always have in the back of my mind that I had to continue looking for a full time job, so still kept applying and bagged another very stable role, not dissimilar to my original job.
Do I regret it, not really. I am in a fortunate position that my DH has just enough to cover the bills, although we are not wealthy by any stretch of the imagination. Had I not jumped ship, I would still be fed up in my original job, and I have learnt a lot from 2 different teams.
Downside, I miss some of my colleagues in my 18 year job, I find the older you get, the harder it is to fit in with established clicks which can be a bummer, and honestly I don’t have what I’d call real friends at my current role.
What I have learnt is that I have skills to move around different jobs and that the world won’t end if I change jobs (which I think I was scared of, being raised to think a stable job was everything).
Only you will know what’s right for you. Good luck.