I agree. I really wish I had shouted at him to just stop, but at the time I just felt like I needed to put up with it. More mad at myself than him tbh.
I'm going to sound like some sort of corporate bullshitter here, but can you practice saying "I'm sorry, I won't be able to accommodate you for anal" and "I'm sorry but we'll have to stop, this is too painful for me." Repeat those phrases to yourself, do it in the mirror. Roleplay his possible reactions and your response to those.
Remove emotion from the equation. You are refusing a service on a purely business basis - if you continue, you will put yourself in too much pain to be able to work the rest of the day and possibly the next. That is a far higher cost of lost business than refusing service and giving a partial refund as a goodwill gesture.
I have recently started offering anal and I always state during the booking process "Please be aware anal is not guaranteed, if it doesn't go ahead then of course you get your extra fee back."
But honestly I've also turned down vaginal service for some big cocks, I just can't take them. It's not the length, it's the girth. I've told plenty of guys, "OK, full sex is not going to be possible as your cock is so wide. We can do an oral only service and I'll refund you 20 quid."
When I first started I thought I had to accommodate everyone for the services I offered. Nope. I am running a business and if a job is going to put me out of action for other clients then I'm most definitely turning them down!