Do you mind making a little explanation how feasible it is because OP's question looks more like a theoretical based question to me more than an actual regular scenario with private keys.
We can generate our own private keys with the specified parameters in multiple ways. Manual methods such as Rolling dice ny converting the results into binary and derive the bitcoin address from it or using the python script
import random
import string
# Define allowed characters (A-Z and 0-9)
chars = string.ascii_uppercase + string.digits
# Generate a 64-character key
custom_private_key = ''.join(random.choices(chars, k=64))
print("Custom Private Key:", custom_private_key)
and in some other ways since OP mentioned that
It is 40 characters long, machine-generated and consists only of capital letters and numbers
I made my calculations for this scenario but in anyway with or without the lowercase it is impossible to break even if the entropy is around 103 bits.