Sometimes you can’t compromise the design to meet the client needs and also pass the test of Webaim tool or acheker. The concept here is you add the following background color to the parent container of the white text and the browser is tricked that the color is black. Beware that the actual users are not still getting any accessibility improvement. This is just a trick for the browsers.
.container {
background-color: #00000004 !important;
}