Postgres chooses seq scan over index scan
Yes, you are right, the problem is the high cost for the Index Scan using ix_foo_history_foo_id.  Observe that it estimates way too many result rows.
Perhaps it helps to
ANALYZE foo_history;

If that alone does not put the estimates right, try
ALTER TABLE foo_history ALTER foo_id SET STATISTICS 1000;
ANALYZE foo_history;

If that does not tilt the scales, perhaps you can INCLUDE some more columns in ix_foo_history_foo_id and replace the SELECT * with only those columns that you really need, so that you get an index-only scan.