If your lawyer repeatedly makes mistakes or other actions that tend to
benefit the other side (this was not a one time thing), even if it
stemmed from incompetence, could that constitute malpractice, or some
related charge such as breach of fiduciary duty?
Incompetence is the principal reason for a malpractice lawsuit, which is a subset of the ubiquitous ground for tort lawsuits which is "negligence", although mere carelessness is also often a ground for a malpractice lawsuit.
For example, in one professional malpractice lawsuit I am aware of, a lawyer failed to have a mortgage securing a debt owed to his client recorded in the real property records as required for it to be effective against third-parties, and so the client lost the benefit of the mortgage, even though this was merely the kind of carelessness an otherwise competent lawyer could commit.
Of course, often carelessness reflects incompetence in the form of failure to competently put in place good systems to guard against careless mistakes.
The legal standard is that the attorney failed to act with the reasonable care of an attorney in a manner that caused harm to the client. This breach of a standard of care is usually established and opposed with expert testimony from an another attorney regarding what a reasonable attorney would have done. A single act of negligence is sufficient (and indeed, usually easier to prove than a series of missteps in most cases).
Breaches of fiduciary duty typically involve breaches of a duty of loyalty (including conflicts of interest that don't involve otherwise negligent work product), misappropriation of client funds, or unauthorized disclosures of client secrets that are damaging outside the context of litigation simply by virtue of the emotional harm associated with their disclosure. Generally speaking, incompetence can only be pursued in an action for professional negligence and not in an action for breach of fiduciary duty.
Sometimes forfeiture of fees paid, or fees owed, is a remedy for breach of fiduciary duty even in the absence of other evidence of damages caused by the breach of a fiduciary duty.
How would this change if your lawyer accepted work from the other
party shortly after he concluded your case to your detriment? And
suppose "discovery" showed that on at least one occasion, the lawyer
represented a small company, A, against a much larger company, B, and
then a year later helped B take over A?
In the U.S. this is governed by Rule of Professional Conduct 1.9 governing duties to a former client. Rules of professional conduct have the same numbering system and are variants on the same American Bar Association set of Model Rules in every U.S. jurisdiction, although there are minor, but important, differences in wording between them.
Generally speaking the rule is that a lawyer can't represent a new client against a former client if it is in a matter in which the former client was previously represented, or in a matter in which the new client gains some advantage from the confidences shared by the former client in the representation of the new client.
Often, the former client would move to disqualify the attorney from representing the new client in the case in question once learning of the representation.