Normally you would first upgrade the vmtools to the latest version possible, before upgrading any HW version.
According to the interopmatrix.vmware.com the latest VMtools supported by 5.0 is 10.0.9
From Hardware Features Available with Virtual Machine Compatibility Settings (vmware.com) i see that vsphere 7 supports HW 10 and later, but vsphere 6.7 does still run HW 8, so you might have to get a 'migration-host' to do the upgrade first to HW version 10.
VMWare workstation 10 or later might will do the trick too
After running on HW 10 you can decide to upgrade to the latest vmtools, and maybe try to upgrade de HW to a higher version, but depending how old and stable the VM is, i would recommend keeping it on HW 10, and only upgrade to a higher level if necessary (i.e. you need more features)