Success!
Based on your blog post, I looked at how centos 7 python 3.6 was compiled, removed all the switches about redhat build and host, and referencing specific directories and used the remaining for my ./configure execution
$ diff python3.6-options.txt python3.6-options-shortened.txt
1,3d0
< '--build=x86_64-redhat-linux-gnu'
< '--host=x86_64-redhat-linux-gnu'
< '--program-prefix='
5,17d1
< '--prefix=/usr'
< '--exec-prefix=/usr'
< '--bindir=/usr/bin'
< '--sbindir=/usr/sbin'
< '--sysconfdir=/etc'
< '--datadir=/usr/share'
< '--includedir=/usr/include'
< '--libdir=/usr/lib64'
< '--libexecdir=/usr/libexec'
< '--localstatedir=/var'
< '--sharedstatedir=/var/lib'
< '--mandir=/usr/share/man'
< '--infodir=/usr/share/info'
29,30d12
< 'build_alias=x86_64-redhat-linux-gnu'
< 'host_alias=x86_64-redhat-linux-gnu'
so my resulting ./configure was as follows
./configure '--disable-dependency-tracking' '--enable-ipv6' '--enable-shared' '--with-computed-gotos=yes' '--with-dbmliborder=gdbm:ndbm:bdb' '--with-system-expat' '--with-system-ffi' '--enable-loadable-sqlite-extensions' '--with-dtrace' '--with-ssl-default-suites=openssl' '--without-ensurepip' '--enable-optimizations' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv ' 'LDFLAGS=-Wl,-z,relro -g ' 'CPPFLAGS= ' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'
It turns out on centos 7
--disable-dependency-tracking and
--with-system-ffi were unneeded, but I left them in because I had other issues I thought might have been caused by them and leaving them in seemed benign. (apparently I had left some garbage from an interim build which apparently wasn't cleaned up from make clean, so I had to start my build from scratch, but this became apparent right after removing those switches)
configure: WARNING: unrecognized options: --disable-dependency-tracking
configure: WARNING: --with(out)-system-ffi is ignored on this platform
Note for my configuration, I need LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib so python3.9 can find the shared library.