Before implementing any algorithm you should consult the documentation that describes this algorithm, otherwise you are risking to never find a solution to the problem the crux of which you don't fully understand. Address is simply an encoded version of some other data. In order to determine what data was taken to calculate an address, you should decode it back. Legacy addresses use Base58 encoding algorithm, which is case sensitive. When you convert it to lowercase like that:
address = address.lower().encode('utf-8')
... you break things and get a wrong result. But it is not the only problem in your code, all other steps are wrong too.
Read this articles before asking questions:
1)
https://en.bitcoin.it/wiki/Base58Check_encoding2)
https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addressesOne-line solution with base58 module:
import base58
checksum = base58.b58decode(address)[-4:].hex()