I think this will do it:
{% if now().month in [1, 3, 5, 7, 8, 10, 12] %}
{% set month_length = 31 %}
{% elif now().month in [4, 6, 9, 11] %}
{% set month_length = 30 %}
{% else %}
{% set month_length = 28 %}
{% endif %}
{% for i in range(month_length - 6, month_length + 1) %}
{% if as_timestamp(now().replace(day = i))| timestamp_custom('%a') == 'Wed' %}
{{ as_timestamp(now().replace(day = i)) | timestamp_custom('%d %B %Y') }}
{% endif %}
{% endfor %}
It should show you the date of the last Wednesday of the month for the current month even if that date has passed. IOW, if the last Wednesday of the month is the 27th this month even on the 28th it will still show the date of the last Wednesday as the 27th. It won’t roll over to show next months last Wednesday until the beginning of next month.
But I think it should meet your needs.
I think…Obviously I haven’t been able to fully test it for every month.
Oh, and it doesn’t take into account leap years