How do I choose a value for an X-capacitor?
I found a post (linked below) which talked about calculating the power
factor, and then choosing a cap that gave you a decent power factor
(without being too greedy).

The best line capacitor to maximize power factor to a value of 1 is when you don't use a line capacitor. Any line capacitor will degrade the power factor of an SMPS. I'll quote what you linked: -

the minimum value is based on the actual conducted EMI and what levels
are acceptable for your application.

In other words, you choose the X capacitor based on keeping conducted emissions low but, you don't choose a value that is obscenely high because that will wreck your power factor: -

For example, a 0.47µF X capacitor across the line with 240VAC input at
60Hz (I know 50Hz would be more common, but lets make things worst
case) will draw roughly 10W of apparent power at all times. If your
SMPS is a 500W ATX power supply, then your power factor is 0.98.
Great! If it is a 50W laptop power brick however, your power factor is
now 0.8. Not so good.


How Do I Choose a Value for an X-Capacitor?

You choose it to significantly reduce your problems of conducted emissions as per this earlier answer I gave you entitled EMI Input Filter Design. You have to address conducted emissions first and foremost and, live with the slightly degraded power factor that the X capacitor brings.
Again, a reminder from the answer you linked: -

It really just comes down to how noisy is your power supply, how much
noise from the mains you want the supply to tolerate, and how good of
a power factor you want. Power factor is almost always going to be
lower priority though, since most countries require you to meet EMI
standards above anything else.