More specific information regarding the legal situation would help a lot. More specifically, is there somewhere you can go to help? A union in most countries, or an institution like Arbeiterkammer in Austria or other worker protection agencies?
The company is stealing your private time, plain and simple. You are paid amount X for time Y. They ask more of Y without giving more of X. They do that by dangling the carrot of promotion in front of everyone, knowing that anyway they will promote only one (or a small number).
That's not an environment I would work in. The tech job market being what it is right now, walk away. Almost every company I know is desperately looking for IT people and you should have not trouble whatsoever finding a new job.
For your actual question: There is no need to refuse politely. This is a work setting, not a weekend with friends. Simply refuse. As soon as your contractual work time is over, you have zero obligations towards the company. Your private time is yours to do with as you please. So: Simply refuse. In fact, refuse from this and all future meetings outside work hours, and make it clear that the fact that the meetings are outside work hours are your reason.
"I see that the meeting is scheduled for 18:30. My work time ends at 17:30 so I will be unable to attend."
Chances are, many of your co-workers are thinking the same thing and simply don't want to be the first (or only) to refuse. You could talk to them, depending on how close you are, and if several of you send an identical refusal, management will get the message and will have no choice but to reschedule.
If you have flexible working hours, you can also simply adapt. I have regular meetings at 8:30 while I typically start around 9. Now during home office times that's no issue for me - but I take that time back by finishing earlier those days or having a long breakfast break after the meeting.
One last thing: You mentioned "at night or on weekends". That could be flat-out illegal or only be allowed with mandatory overpay - all depending on your jurisdiction. Especially the Sunday is strongly protected in many countries. In light of those two key words I strongly suggest you contact whoever represents employees in your country.
And don't forget that you work in IT. You are stronger than they are. You will find a new job more quickly than they will find a new worker.