Reconsidering a possible answer is
Capital letters
I only have it once most of you do too
Refers to the line pair itself with 'I' being the only capital. This interpretation fits with Hints 4 & 5.
It's easy to imagine how I could have a few
This line currently has only 2 capitals - but see Hint 1 for how this may be increased.
It usually is bigger and comes with a certain lock
Capitals are usually larger (b, d, h, k, l, same height) and may be applied by the Caps Lock key.
But it's smaller by 40 from a small one in the flock
In Ascii Octal capital letters 'A' = 101, 'a' = 141 ... and so on to 'Z' = 132, 'z' = 172.
The capital letter in Octal! is 40 smaller than the small one.
Hint 1. in 'It's easy to imagine / how I could have a few', I would count either 18 or 34
Writing this line in full without the apostrophe: It is easy to imagine how I could have a few.
This has 34 total letters and 18 different letters as repeated are: 5i, 2t, 2s, 4e, 4a, 3o, 2h, 2w.
Hint 2. Mind the semantics. The poem describes something, but it's not in first person, i.e. 'I' in the poem doesn't refer to the answer. Then What does it refer to?
'I' is the stanza line itself.
Hint 3. Smaller by 40, not from any "small one" but from a closely related one.
Capital letters are 40 less than in value than their corresponding small letter in Ascii Octal!
Hint 4.
I have exactly Two
'I' and 'T'
Hint 5.
I is context dependent. It refers to the same type of thing each time, but not the same specific thing. (By the way I have four)
And I have two
'I', 'I', 'B' and 'I' → 4
And I have two: 'A' and 'I' → 2