There just never seemed to be a right time to commit population as specialists. I'd really appreciate some pointers about where I'm going wrong in my thinking.
So would I, but let me see if I can offer anything useful...
...So no religion, and since I was prioritising the wrong techs it took me a long time to reach Calendar so no happiness resources for an awful long time either.
In other words, the ideal situation to run some specialists, right? Well I was building farms all over the place and had big food surpluses but every time I started bumping the happiness limit it always seemed a more attractive option to whip builds rather than assign a specialist.
Well, prioritizing the wrong techs is clearly a mistake

Happiness is a strategic problem that you have to work out how you are going to address early.
Beyond that, I would question what you were building. I would expect that you could get by with Granary, Library, Barracks. That gets you two scientists per city, which should get things cooking a bit for you. All that's left to do is units.
At this point expanding up to it seemed a much better idea than assigning specialists because what I felt I really needed was production, especially as I was no longer in Slavery.
Why did you think you needed production?
I would normally expect that at this period, cities should either be running as many specialists as they can (which may include starving some of the food out of the granary) to get the next GP as soon as possible, then fire the specialists and grow as quickly as possible to the next happy cap, then hire the specialists and again race to the next GP.
If you fall into the trap of producing units to up the happy cap, and then using that population to work farms, and meanwhile you need more infrastructure to support your larger population, and then more hammers to get more happy, you can get stuck.
Instead, I suggest trying to be a bit more precise - focus the happiness, instead of spreading it out, allow yourself to run stagnant at your health limit, rather than pushing it. When you can't stand waiting for a building, get every city lined up with a couple of builds at once, then take a few turns in slavery to whip it out and continue.
OK, now I'm sure I've got something wrong. Throughout the game I've never felt that I've been able to put my hands on enough cash. I have a sustainable deficit at 70% and I daren't go much lower because Mansa is approximately equal in tech. I have an outdated army because I can't afford to upgrade them and the last thing I want is more expenses bleeding away on more units. Lowering the slider seems like a bad idea as I don't have a tech lead over Mansa therefore I would need a huge numerical advantage to cause him any problems which may wreck my game completely. The only thing I had going for me was that I was Friendly with him so he wasn't about to attack me.
My feeling generally with Mansa is that if you can stay close at all, you can reel him in during spaceship production. From the sound of things, you were having trouble staying close because you weren't ever running specialists hard - therefore you were getting many fewer GP than would normally be expected, and you may have been smearing them rather than making sure that every city popped a GP.
Disclaimer: Ive taken a few swings at running an SE, or even an SE with a commerce based capital, but never felt like I had actually done it right.