Will you end up stooped like your granddad? Almost certainly no.

Medicine has moved a long way since he first got this disease, and even though I don't think you have found the perfect treatment for yourself yet, you are only young and things are changing in the way AS is treated really rapidly. That means you will have access to a whole heap more possible treatment in your lifetime than he ever had, plus you can get MRIs to keep an eye on the speed of progression (which he wouldn't have had). If you keep under the care of a good rheumatologist, then there is no reason that you should end up with the same kind of deformity and problems that your granddad might have, though if he has got to more than 90 without being treated, then is it really the awful disability that you fear?

If you want to prevent the stooping, then exercise and good posture is the way to go - download the guide from the UK NASS site (theres an app too), keep up the low-impact exercising (including pilates, yoga, or maybe even tai chi), and pay really good attention to your posture. Your grandad likely got that way because in those days there wasn't such a good understanding of AS - I know my Dad (who would be in his 80's if he was still alive) got given corsets and stuff to stop his spine moving which was quite the wrong thing to do. If he'd been advised to keep on moving he may not have had his upper spine fuse in a slightly forward position, though he did exercise a lot in his later years, so didn't end up noticeably stooped.

Probably the biggest danger for you is how you work at a computer - you MUST set up your workstation ergonomically, and that means in most cases changing the height of your chair (most people get it wrong), possibly adding in a footstool as desks aren't usually the right height, and raising the height of your screen (again, most folk have it far too low, when it should be at eye level). If you google computer ergonomics you can see how to measure and check yourself. Also doing "desk stretches" and getting up and moving every hour.

My opinion is that you are definitely not "doomed to follow in that path".