Hi,
I am just finishing S6 and I did 3 advanced highers: biology, chemistry and maths and am going to study medicine at the university of Glasgow hopefully.
I'll start by saying I actually started off doing 4 advanced highers, my 3 plus English. I, much like you, thought the essay writing would benefit my future in medicine (that isn't something I can comment on yet) and I also enjoyed the subject a lot for literary analysis. I did the 4 subjects together in that period of online learning and as I did find it challenging it was very much manageable. However as school opened I realised how I'd much rather my time doing other activities that would also benefit my application. You'll have to sit the UCAT and then prepare for interviews as well as other application stuff which in itself feels like a whole other subject. There was also the fact that I really wanted to enjoy my last year with my friends and relax more before the storm of uni. Hence my decision to drop English. So I'd take 4 advanced highers at my own risk.
In terms of subject choice, either is acceptable and honestly I don't think it matters to unis that much. You're better off doing something you enjoy or you know you're good at to secure the grade. Id also consider the coursework associated and how that might effect ur time management. Obviously this year course work was cancelled but AH Maths doesn't have any coursework which can be seen as a good or bad thing.
I've rambled a lot but I hope this helps you make a decision.
p.s. Law isnt really a related subject to medicine and has a separate entrance exam so I dont think you could apply for that as your 5th choice.