ag.algebraic geometry – Computing homology class of curve in product of elliptic curves

I have a smooth, projective curve $$X/mathbb{C}$$ of genus $$g$$, embedded in a product of elliptic curves $$A = prod_{i=1}^g E_i$$. Since $$H_*(A; mathbb{Z})$$ with the Pontryagin product is isomorphic to the exterior algebra $$Lambda(H_1(A; mathbb{Z})) cong Lambda(mathbb{Z}^{2g})$$, given a basis $$a_1, dots, a_{2g}$$ for $$H_1(A; mathbb{Z})$$, we get a basis $${a_i wedge a_j : 1 leq i < j leq 2g}$$ for $$H_2(A; mathbb{Z})$$. Is there a practical algorithm that computes the fundamental class $$(X) in H_2(A; mathbb{Z})$$ in terms of this basis, given defining equations for $$X$$ and each $$E_i$$? If so, has it been implemented in computer algebra software like Sage, Magma, Macaulay2, etc.?

(For broader context, my actual goal is to compute the degree of the induced map $$operatorname{Jac}(X) to A$$, which I’ve already proven is an isogeny in my case. If I can compute the fundamental class $$(X) in H_2(A; mathbb{Z})$$, then I can extract the degree of this isogeny from the value of the power $$(X)^g$$ under the Pontryagin product.)