Reverts commit ab4efad51b9ba276ffeb6871931e13772493f7cc (PR #26970). This workaround is not needed anymore, as since #27114 the test sets the noban permission for both in- and outbound connections via the noban_tx_relay setting, and we don't have to rely on this topology hack anymore. See commit c985eb854cc86deb747caea5283c17cf51b6a983 (kudos to brunoerg!).
Can be tested by executing $ time ./test/functional/wallet_groups.py both on master and PR and verifying that the execution time is roughly equal.