1.4.22 bundled in WildFly? how did you do that? replace the io.undertow.* modules? or in your application?
in any case, best solution, would be to upgrade WildFly to newer version.
Bundled 1.4.22 in the Wildfly modules.
Upgrading Wildfly is not an option at this point unfortunately.
It is very likely you are seeing the live sessions consuming memory. Which is perfectly normal situation.
There is a configuration option in Wildfly to manage when a session will be timed out. Using this avoids large numbers of sessions hanging around.
Try setting session-timeout in your web application web.xml
The default timeout is 30 minutes.
Try reducing that to a smaller value than 30. Then try running your performance test again.
What you are aiming for is a stable number of live sessions and stable server performance. You discovered the amount using a heapdump. To find the optimal number you might have to repeat the test with different values until you achieve acceptable performance over a long period of time.