My (original) keyboard case gave up after a couple years. it seems the connection relies on magnets apart from the actual smart connectors and if the case gets slightly bent they go out of line and the connection fails or gets spotty. They can also become demagnetised.
I tried a lot of solutions even running a magnet along the folio connection which worked for a few days but eventually just went back to carrying an apple keyboard along with the iPad.
Take away, I guess I had my moneys worth out of it, but I would not buy another.